home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 278.9 KB | 5,746 lines | [TEXT/MPS ] |
- æKY CopyrightNotice
- æC Copyright Apple Computer, Inc. 1985-1989, All rights reserved.
- 411 - Resources Help - MPW 3.2 Alpha Release.
- Friday, December 15, 1989 8:44:57 AM
-
- æKY Help,ResourcesHelp
- æKL actb
- acur
- ALRT
- BNDL
- cctb
- cicn
- clut
- cmdo
- CNTL
- crsr
- CURS
- dctb
- DITL
- DLOG
- DRVR
- DRVW
- fctb
- finf
- FOND
- FONT
- FREF
- FWID
- ICON
- ICN#
- insc
- INTL0
- itl0
- INTL1
- itl1
- itl2
- itl4
- itlb
- itlc
- itlk
- KCAP
- KCHR
- KMAP
- KSWP
- MBAR
- mcky
- mctb
- MENU
- mppc
- mxbc
- mxbi
- mxbm
- mxwt
- NFNT
- nrct
- PAT
- PAT#
- PICT
- pltt
- ppat
- ROv#
- scrn
- SICN
- SIZE
- snd
- STR
- STR#
- wctb
- WIND
-
- Resources
- æKY Resources
- æC Rez ResEdit
- actb • Alert Color Lookup Table...................Types.r.........Editor
- acur •
- ALRT • Alert Template.............................Types.r.........Editor
- BNDL • Bundle.....................................Types.r.........Editor
- cctb • Control Color Lookup Table.................Types.r.........Editor
- cicn • Color Icon.................................Types.r.........General
- clut • Generic Color Lookup Table.................Types.r.........Editor
- cmdo • For MPW commando interface.................Cmdo.r..........Editor
- CNTL • Control Template...........................Types.r.........Editor
- crsr • Color Cursor...............................Types.r.........General
- CURS • Cursor.....................................Types.r.........Editor
- dctb • Dialog Color Lookup Table..................Types.r.........Editor
- DITL • Dialog Item List...........................Types.r.........Editor
- DLOG • Dialog Template............................Types.r.........Editor
- DRVR • Driver.....................................SysTypes.r......Editor
- fctb • Font Color Lookup Table....................Types.r.........Editor
- finf • Font information...........................SysTypes.r......Editor
- FOND • Font Family Description....................SysTypes.r......Editor
- FONT • Font Description...........................SysTypes.r......Editor
- FREF • File Reference.............................Types.r.........Editor
- FWID • Font Width Table...........................SysTypes.r......Editor
- ICON • Icon.......................................Types.r.........Editor
- ICN# • Icon List..................................Types.r.........Editor
- insc • Installer Script...........................SysTypes.r......Editor
- INTL0 • International Formatting Information......SysTypes.r......Editor
- itl0 • International Formatting Information.......SysTypes.r......Editor
- INTL1 • International Date/Time Information.......SysTypes.r......Editor
- itl1 • International Date/Time Information........SysTypes.r......Editor
- itl2 • Intl Str Comparision Package Hooks.........SysTypes.r......General
- itl4 • International Tokenize.....................SysTypes.r......General
- itlb • International Script Bundle................SysTypes.r......Editor
- itlc • International Configuration................SysTypes.r......Editor
- itlk • Intl exception dictionary for kchar........ ......Editor
- KCAP • Physical Layout of Keyboard................SysTypes.r......Editor
- KCHR • ASCII Mapping (software)...................SysTypes.r......Editor
- KMAP • Keyboard Mapping (hardware)................SysTypes.r......Editor
- KSWP • Keyboard Swapping..........................SysTypes.r......General
- MBAR • Menu Bar...................................Types.r.........Editor
- mcky • Mouse Tracking.............................SysTypes.r......General
- mctb • Menu Color Lookup Table....................Types.r.........Editor
- MENU • Menu.......................................Types.r.........Editor
- mppc • MPP Configuration Resource.................SysTypes.r......General
- mxbc • MacsBug 6.0 ............................... ......General
- mxbi • MacsBug 6.0 init........................... ......General
- mxbm • MacsBug 6.0 macros......................... ......General
- mxwt • MacsBug 6.0 templates...................... ......General
- NFNT • Font Description...........................SysTypes.r......General
- nrct • Rectangle position list....................SysTypes.r......Editor
- PAT • Quickdraw Pattern..........................Types.r.........Editor
- PAT# • Quickdraw Pattern List.....................Types.r.........Editor
- PICT • Quickdraw Picture..........................Types.r.........Editor
- pltt • Color Palette..............................Types.r.........Editor
- ppat • Pixel Pattern..............................Types.r.........Editor
- ROv# • ROM Resource Override......................SysTypes.r......Editor
- scrn • Screen Configuration.......................SysTypes.r......Editor
- SICN • Small Icon.................................Types.r.........Editor
- SIZE • MultiFinder Size Information...............Types.r.........Editor
- snd • Sound......................................SysTypes.r......General
- STR • PascalStyle String.........................Types.r.........Editor
- STR# • PascalStyle String List....................Types.r.........Editor
- wctb • Window Color Lookup Table..................Types.r.........Editor
- WIND • Window Template............................Types.r.........Editor
- æKY actb
- æC /*----------------------------actb • Alert Color Lookup Table----------------------------*/
- type 'actb' {
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer wContentColor, /* value */
- wFrameColor,
- wTextColor,
- wHiliteColor,
- wTitleBarColor;
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- };
- æKY acur
- æC /*------------------------acur • ----------------------------------*/
- type 'acur' {
- integer = $$CountOf(CursIdArray); /* Nbr of cursors */
- fill word; /* Next frame to show */
- array CursIdArray {
- integer; /* 'CURS' resource id for a frame */
- fill word; /* Pad word to make longint */
- };
- };
-
- æKY ALRT
- æC /*----------------------------ALRT • Alert Template-------------------------------------*/
- type 'ALRT' {
- rect; /* boundsRect */
- integer; /* 'DITL' ID */
-
- /* NOTE: the stages are ordered 4, 3, 2, 1 */
- wide array [4] {
- boolean OK, Cancel; /* Bold Outline */
- boolean invisible, visible; /* Draw Alert */
- unsigned bitstring[2] silent = 0
- sound1, sound2, sound3; /* Beeps */
- };
- };
- æKY BNDL
- æC /*----------------------------BNDL • Bundle---------------------------------------------*/
- type 'BNDL' {
- literal longint; /* Signature */
- integer; /* Version ID */
- integer = $$CountOf(TypeArray) - 1;
- array TypeArray {
- literal longint; /* Type */
- integer = $$CountOf(IDArray) - 1;
- wide array IDArray {
- integer; /* Local ID */
- integer; /* Actual ID */
- };
- };
- };
- æKY cctb
- æC /*----------------------------cctb • Control Color Lookup Table-------------------------*/
- type 'cctb' {
- unsigned hex longint; /* CCSeed */
- integer; /* ccReserved */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer cFrameColor, /* partcode */
- cBodyColor,
- cTextColor,
- cElevatorColor;
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- };
-
- æKY cicn
- æC /*----------------------------cicn • Color Icon-----------------------------------------*/
- #define PIXMAPHEIGHT ($$BitField(Bounds, 32, 16) /* bottom */ \
- - $$BitField(Bounds, 0, 16) /* top */)
-
- type 'cicn' {
- /* IconPMap (pixMap) record */
- fill long; /* Base address */
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- pMapRowBytes:
- unsigned bitstring[13]; /* Offset to next row */
- Bounds:
- rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint; /* Offset to color table*/
- fill long; /* Reserved */
-
- /* IconMask (bitMap) record */
- fill long; /* Base address */
- maskRowBytes:
- integer; /* Row bytes */
- rect; /* Bitmap bounds */
-
- /* IconBMap (bitMap) record */
- fill long; /* Base address */
- iconBMapRowBytes:
- integer; /* Row bytes */
- rect; /* Bitmap bounds */
-
- fill long; /* Handle placeholder */
-
- /* Mask data */
- hex string [$$Word(maskRowBytes) * PIXMAPHEIGHT];
-
- /* BitMap data */
- hex string [$$Word(iconBMapRowBytes) * PIXMAPHEIGHT];
-
- /* Color Table */
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
-
- /* PixelMap data */
- hex string [$$BitField(pMapRowBytes, 0, 13) * PIXMAPHEIGHT];
- };
- _______________________________________________________________________________
-
- »COLOR QUICKDRAW RESOURCE FORMATS
- _______________________________________________________________________________
-
- Several new resource types have been defined for use with Color QuickDraw. They
- are
-
- 'crsr' Color cursor resource type
- 'ppat' Pixel Pattern resource type
- 'cicn' Color Icon resource type
- 'clut' Color Look-Up Table resource type
-
- The precise formats of resources of these types are given below.
-
- It is important to note that resources are used somewhat differently by Color QuickDraw.
- For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
- the same handle would be passed back to the application each time. With Color QuickDraw,
- the color cursor, icon, and pattern are compound structures, more complex than a
- simple resource handle. Color QuickDraw reads the requested resource, copies it, and
- then alters the copy before passing it to the application. Each time you call GetCCursor,
- you get a new copy of the cursor. This means that you should do one GetCCursor call
- for a cursor, even if you do multiple SetCCursor calls. These new resource types
- should be marked as purgeable if you are concerned about memory space.
-
- Here are the resource formats of the resources used by Color QuickDraw. All offsets
- are measured from the beginning of the resource’s data.
-
- »'cicn' (Color Icon)
-
- IconPMap {pixMap describing icon’s pixel image}
- baseAddr [4 bytes] = 0
- rowBytes [2 bytes] = rowBytes of image
- bounds [8 bytes] = boundary rectangle of image
- pmVersion [2 bytes] = 0
- packType [2 bytes] = 0
- packSize [4 bytes] = 0
- hRes [4 bytes] = $00480000
- vRes [4 bytes] = $00480000
- pixelType [2 bytes] = 0 = chunky
- pixelSize [2 bytes] = bits per pixel in image
- cmpCount [2 bytes] = 1
- cmpSize [2 bytes] = pixelsize
- planeBytes [4 bytes] = 0
- pmTable [4 bytes] = 0
- pmReserved [4 bytes] = 0
- IconMask {Mask used when drawing icon}
- baseAddr [4 bytes] = 0
- rowBytes [2 bytes] = rowBytes of image
- bounds [8 bytes] = boundary rectangle of image
- IconBMap {Image used when drawing to 1 bit screen}
- baseAddr [4 bytes] = 0
- rowBytes [2 bytes] = rowBytes of image
- bounds [8 bytes] = boundary rectangle of image
- IconData {placeholder for image’s handle}
- [4 bytes] = 0
- MaskData {the icon’s mask data }
- [n bytes] n = IconMask.rowBytes*height
- BMapData {the icon’s bitMap data }
- [n bytes] n = IconBMap.rowBytes*height
- PMapCTab {the icon’s color table }
- [n bytes] n = 8+(ColorTable.ctSize+1)*CTEntrySize
- PMapData {the icon’s image data }
- [n bytes] n = IconPMap.rowBytes*height
-
- In the calculations above:
-
- height = IconPMap^^.bounds.bottom–IconPMap^^.bounds.top.
-
- IconPMap is the pixMap describing the data in the IconData field. IconMask is the
- mask that is to be applied to the data when it is drawn. IconBMap is a bitMap to be
- drawn when the destination is only one or two pixels deep. If the rowbytes field of
- IconBMap is 0, then no data is loaded in for the IconBMap, and IconPMap is always
- used when drawing the icon. MaskData is the mask’s data. It is immediately followed
- by the bitMap’s data (which may be NIL). Next is the color table describing the
- IconPMap, as shown below. The final entry in the resource is the pixMap’s data.
-
- æKY clut
- æC /*----------------------------clut • Generic Color Lookup Table-------------------------*/
- type 'clut' {
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- };
- _______________________________________________________________________________
-
- »COLOR QUICKDRAW RESOURCE FORMATS
- _______________________________________________________________________________
-
- Several new resource types have been defined for use with Color QuickDraw. They
- are
-
- 'crsr' Color cursor resource type
- 'ppat' Pixel Pattern resource type
- 'cicn' Color Icon resource type
- 'clut' Color Look-Up Table resource type
-
- The precise formats of resources of these types are given below.
-
- It is important to note that resources are used somewhat differently by Color QuickDraw.
- For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
- the same handle would be passed back to the application each time. With Color QuickDraw,
- the color cursor, icon, and pattern are compound structures, more complex than a
- simple resource handle. Color QuickDraw reads the requested resource, copies it, and
- then alters the copy before passing it to the application. Each time you call GetCCursor,
- you get a new copy of the cursor. This means that you should do one GetCCursor call
- for a cursor, even if you do multiple SetCCursor calls. These new resource types
- should be marked as purgeable if you are concerned about memory space.
-
- Here are the resource formats of the resources used by Color QuickDraw. All offsets
- are measured from the beginning of the resource’s data.
-
- »'clut' (Color Table)
-
- ctSeed [4 bytes] = 0
- ctFlags [2 bytes] = $0000 if pixMap color table
- = $8000 if device color table
- ctSize [2 bytes] = #entries – 1
- table data [n bytes] n = 8*(ctSize+1)
-
- The 'clut' resource format is an exact duplicate of a color table in memory. Each
- element in the table data is four integers (eight bytes): a value field followed by
- red, green, and blue values. If the color table is used to describe a pixMap, then
- ctFlags should be set to 0, and the value field of each entry contains the pixel
- value to be associated with the following RGB. If the color table is used to describe
- a device, then ctFlags should be set to $8000, and the value fields should be set to
- 0. In this case, the implicit values are based on each entry’s position in the
- table.
-
- There are several default color tables that are in the Macintosh II ROMs. There is
- one for each of the standard pixel depths. The resource ID for each table is the
- same as the depth. For example, the default color table used when you switch your
- system to 8 bits per pixel mode is stored with resource ID = 8.
-
- There is one other default color table. This color table defines the eight QuickDraw
- colors, the colors displayed by programs using the old QuickDraw model. This color
- table has ID = 127. Its values are given in the section
- “Setting the Foreground and Background Colors”.
-
- æKY CNTL
- æC /*----------------------------CNTL • Control Template-----------------------------------*/
- type 'CNTL' {
- rect; /* Bounds */
- integer; /* Value */
- byte invisible, visible; /* visible */
- fill byte;
- integer; /* Max */
- integer; /* Min */
- integer pushButProc, /* ProcID */
- checkBoxProc,
- radioButProc,
- pushButProcUseWFont = 8,
- checkBoxProcUseWFont,
- radioButProcUseWFont,
- scrollBarProc = 16;
- longint; /* RefCon */
- pstring; /* Title */
- };
- æKY crsr
- æC /*----------------------------crsr • Color Cursor---------------------------------------*/
- type 'crsr' {
- /* CCrsr record */
- hex unsigned integer oldCursor = $8000, /* Type of cursor */
- colorCursor = $8001;
- unsigned longint = pixMap / 8; /* Offset to pixMap */
- unsigned longint = pixelData / 8; /* Offset to pixel data */
- fill long; /* Expanded cursor data */
- fill word; /* Expanded data depth */
- fill long; /* Reserved */
- hex string [32]; /* One bit cursor data */
- hex string [32]; /* One bit cursor mask */
- point; /* Hot spot */
- fill long; /* Table id */
- fill long; /* id for cursor */
-
- /* IconPMap (pixMap) record */
- pixMap:
- fill long; /* Base address */
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- unsigned bitstring[13]; /* Offset to next row */
- rect; /* Bitmap bounds */
- integer; /* pixMap version number*/
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint = colorTable / 8; /* Offset to color table*/
- fill long; /* Reserved */
-
- pixelData:
- hex string [(colorTable - pixelData) / 8]; /* Pixel data */
-
- /* Color Table */
- colorTable:
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- };
- _______________________________________________________________________________
-
- »COLOR QUICKDRAW RESOURCE FORMATS
- _______________________________________________________________________________
-
- Several new resource types have been defined for use with Color QuickDraw. They
- are
-
- 'crsr' Color cursor resource type
- 'ppat' Pixel Pattern resource type
- 'cicn' Color Icon resource type
- 'clut' Color Look-Up Table resource type
-
- The precise formats of resources of these types are given below.
-
- It is important to note that resources are used somewhat differently by Color QuickDraw.
- For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
- the same handle would be passed back to the application each time. With Color QuickDraw,
- the color cursor, icon, and pattern are compound structures, more complex than a
- simple resource handle. Color QuickDraw reads the requested resource, copies it, and
- then alters the copy before passing it to the application. Each time you call GetCCursor,
- you get a new copy of the cursor. This means that you should do one GetCCursor call
- for a cursor, even if you do multiple SetCCursor calls. These new resource types
- should be marked as purgeable if you are concerned about memory space.
-
- Here are the resource formats of the resources used by Color QuickDraw. All offsets
- are measured from the beginning of the resource’s data.
-
- »'crsr' (Color Cursor)
-
- CCrsr {data structure describing cursor}
- crsrType: [2 bytes] = $8001
- crsrMap: [4 bytes] = offset to pixMap structure
- crsrData: [4 bytes] = offset to pixel data
- crsrXData: [4 bytes] = 0
- crsrXValid: [2 bytes] = 0
- crsrXHandle: [4 bytes] = 0
- crsr1Data: [32 bytes] = 1 bit image for cursor
- crsrMask: [32 bytes] = cursor’s mask
- crsrHotSpot: [4 bytes] = cursor’s hotSpot (v,h)
- crsrXTable: [4 bytes] = 0
- crsrID: [4 bytes] = 0
- PixMap {pixMap describing cursor’s pixel image}
- baseAddr: [4 bytes] = 0
- rowBytes: [2 bytes] = rowBytes of image
- bounds: [8 bytes] = boundary rectangle of image
- pmVersion: [2 bytes] = 0
- packType: [2 bytes] = 0
- packSize: [4 bytes] = 0
- hRes: [4 bytes] = $00480000
- vRes: [4 bytes] = $00480000
- pixelType: [2 bytes] = 0 = chunky
- pixelSize: [2 bytes] = bits per pixel in image
- cmpCount: [2 bytes] = 1
- cmpSize: [2 bytes] = pixelsize
- planeBytes: [4 bytes] = 0
- pmTable: [4 bytes] = offset to color table data
- pmReserved: [4 bytes] = 0
- pixel data [see below] data for cursor
- color table data [see below] data for color table
-
- The crsrMap field of the CCrsr record contains an offset to the pixMap record from
- the beginning of the resource data. The crsrData field of the CCrsr record contains
- an offset to the pixel data from the beginning of the resource data. The pmTable
- field of the pixMap record contains an offset to the color table data from the beginning
- of the resource data. The size of the pixelData is calculated by subtracting the
- offset to the pixel data from the offset to the color table data. The color table
- data consists of a color table record
- (ctSeed, ctFlags, ctSize) followed by ctSize+1 color table entries. Each entry in the
- color table connects a pixel value used in the pixel data to an actual RGB.
-
- æKY CURS
- æC /*----------------------------CURS • Cursor---------------------------------------------*/
- type 'CURS' {
- hex string [32]; /* Data */
- hex string [32]; /* Mask */
- point; /* Hot spot */
- };
- æKY dctb
- æC /*----------------------------dctb • Dialog Color Lookup Table--------------------------*/
- type 'dctb' as 'actb';
- æKY DITL
- æC /*----------------------------DITL • Dialog Item List-----------------------------------*/
- type 'DITL' {
- integer = $$CountOf(DITLarray) - 1; /* Array size */
- wide array DITLarray {
- fill long;
- rect; /* Item bounds */
- switch {
- case Button:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 4;
- pstring; /* Title */
-
- case CheckBox:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 5;
- pstring; /* Title */
-
- case RadioButton:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 6;
- pstring; /* Title */
-
- case Control:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 7;
- byte = 2;
- integer; /* 'CTRL' ID */
-
- case StaticText:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 8;
- pstring; /* Text */
-
- case EditText:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 16;
- pstring; /* Text */
-
- case Icon:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 32;
- byte = 2;
- integer; /* 'ICON' ID */
-
- case Picture:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 64;
- byte = 2;
- integer; /* 'PICT' ID */
-
- case UserItem:
- boolean enabled,disabled; /* Enable flag */
- key bitstring[7] = 0;
- byte = 0;
- };
- align word;
- };
- };
- æKY DLOG
- æC /*----------------------------DLOG • Dialog Template------------------------------------*/
- type 'DLOG' {
- rect; /* boundsRect */
- integer documentProc, /* procID */
- dBoxProc,
- plainDBox,
- altDBoxProc,
- noGrowDocProc,
- zoomDocProc = 8,
- zoomNoGrow = 12,
- rDocProc = 16;
- byte invisible, visible; /* visible */
- fill byte;
- byte noGoAway, goAway; /* goAway */
- fill byte;
- unsigned hex longint; /* refCon */
- integer; /* 'DITL' ID */
- pstring; /* title */
- };
- æKY fctb
- æC /*----------------------------fctb • Font Color Lookup Table----------------------------*/
- type 'fctb' as 'clut';
-
- »Font Color Tables
-
- Note: The extensions to the Font Manager described in the following paragraphs
- were originally documented in Inside Macintosh, Volume V. As such,
- this information refers to the Macintosh SE and Macintosh II ROMs and
- System file version 4.1 and later.
-
- With resources of type 'NFNT', you can specify absolute colors for the font by also
- supplying a color table. Stored as a resource of type 'fctb' with the same ID as the
- associated 'NFNT' resource, this table is simply the ColorTable record described in
- the Color Manager chapter.
-
- A 4-bit font depth provides index values for a color table containing 16 entries. If
- there are index values for which no corresponding entries are found in the associated
- color table, the Font Manager assigns colors based on the current port’s foreground
- and background colors. If only one entry is missing, it’s assigned the background
- color. If two entries are missing, the higher index value is assigned the foreground
- color and the lower value is given the background color. If more than two values are
- missing, the entries are given shades ranging between the foreground and background
- colors. Figure 19 shows a hypothetical color table for a 2-bit font in which only
- five entries have been supplied in the 'fctb' resource.
-
- •••Refer to Figure 19.•••
-
- Figure 19–Hypothetical Font Color Table Entries
-
- If no color table is provided, the highest and lowest possible index values for any
- given screen depth (with a 2-bit screen depth, for example, values 7 and 0) are
- assigned the foreground and background colors respectively, with the remaining entries
- given shades in between. This allows gray-scale fonts to be created with as many
- levels of gray as are needed (since each gray is just a color in between a foreground
- of black and a background of white) without needing a color table.
-
- æKY FREF
- æC /*----------------------------FREF • File Reference-------------------------------------*/
- type 'FREF' {
- literal longint; /* File Type */
- integer; /* Icon ID */
- pstring; /* Filename */
- };
- æKY ICON
- æC /*----------------------------ICON • Icon-----------------------------------------------*/
- type 'ICON' {
- hex string[128]; /* Icon data */
- };
- æKY ICN#
- æC /*----------------------------ICN# • Icon List------------------------------------------*/
- type 'ICN#' {
- array {
- hex string[128]; /* Icon data */
- };
- };
- æKY MENU
- æC /*----------------------------MENU • Menu-----------------------------------------------*/
- type 'MENU' {
- integer; /* Menu ID */
- fill word[2];
- integer textMenuProc = 0; /* ID of menu def proc */
- fill word;
- unsigned hex bitstring[31]
- allEnabled = 0x7FFFFFFF; /* Enable flags */
- boolean disabled, enabled; /* Menu enable */
- pstring apple = "\0x14"; /* Menu Title */
- wide array {
- pstring; /* Item title */
- byte noIcon; /* Icon number */
- char noKey = "\0x00", /* Key equivalent or */
- hierarchicalMenu = "\0x1B"; /* hierarchical menu */
- char noMark = "\0x00", /* Marking char or id */
- check = "\0x12"; /* of hierarchical menu */
- fill bit;
- unsigned bitstring[7]
- plain; /* Style */
- };
- byte = 0;
- };
- æKY MBAR
- æC /*----------------------------MBAR • Menu Bar-------------------------------------------*/
- type 'MBAR' {
- integer = $$CountOf(MenuArray); /* Number of menus */
- wide array MenuArray{
- integer; /* Menu resource ID */
- };
- };
- æKY mctb
- æC /*----------------------------mctb • Menu Color Lookup Table----------------------------*/
- type 'mctb' {
- integer = $$CountOf(MCTBArray); /* Color table count */
- wide array MCTBArray {
- integer mctbLast = -99; /* Menu resource ID */
- integer; /* Menu Item */
- wide array [4] {
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- fill word; /* Reserved word */
- };
- };
- æKY PAT
- æC /*----------------------------PAT • Quickdraw Pattern----------------------------------*/
- type 'PAT ' {
- hex string[8]; /* Pattern */
- };
- æKY PAT#
- æC /*----------------------------PAT# • Quickdraw Pattern List-----------------------------*/
- type 'PAT#' {
- integer = $$Countof(PatArray);
- array PatArray {
- hex string[8]; /* Pattern */
- };
- };
- æKY pltt
- æC /*----------------------------pltt • Color Palette--------------------------------------*/
- type 'pltt' {
- integer = $$CountOf(ColorInfo); /* Color table count */
- fill long; /* Reserved */
- fill word; /* Reserved */
- fill long; /* Reserved */
- fill long; /* Reserved */
- wide array ColorInfo {
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- integer pmCourteous, pmDithered, pmTolerant, /* Color usage */
- pmAnimated = 4, pmExplicit = 8;
- integer; /* Tolerance value */
- fill word; /* Private flags */
- fill long; /* Private */
- };
- };
-
- æKY ppat
- æC /*----------------------------ppat • Pixel Pattern--------------------------------------*/
- type 'ppat' {
- /* PixPat record */
- integer oldPattern, /* Pattern type */
- newPattern,
- ditherPattern;
- unsigned longint = PixMap / 8; /* Offset to pixmap */
- unsigned longint = PixelData / 8; /* Offset to data */
- fill long; /* Expanded pixel image */
- fill word; /* Pattern valid flag */
- fill long; /* expanded pattern */
- hex string [8]; /* old-style pattern */
-
- /* PixMap record */
- PixMap:
- fill long; /* Base address */
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- unsigned bitstring[13]; /* Offset to next row */
- rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint = ColorTable / 8; /* Offset to color table*/
- fill long; /* Reserved */
-
- PixelData:
- hex string [(ColorTable - PixelData) / 8];
-
- ColorTable:
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- };
-
- _______________________________________________________________________________
-
- »COLOR QUICKDRAW RESOURCE FORMATS
- _______________________________________________________________________________
-
- Several new resource types have been defined for use with Color QuickDraw. They
- are
-
- 'crsr' Color cursor resource type
- 'ppat' Pixel Pattern resource type
- 'cicn' Color Icon resource type
- 'clut' Color Look-Up Table resource type
-
- The precise formats of resources of these types are given below.
-
- It is important to note that resources are used somewhat differently by Color QuickDraw.
- For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
- the same handle would be passed back to the application each time. With Color QuickDraw,
- the color cursor, icon, and pattern are compound structures, more complex than a
- simple resource handle. Color QuickDraw reads the requested resource, copies it, and
- then alters the copy before passing it to the application. Each time you call GetCCursor,
- you get a new copy of the cursor. This means that you should do one GetCCursor call
- for a cursor, even if you do multiple SetCCursor calls. These new resource types
- should be marked as purgeable if you are concerned about memory space.
-
- Here are the resource formats of the resources used by Color QuickDraw. All offsets
- are measured from the beginning of the resource’s data.
-
- »'ppat' (Pixel Pattern)
-
- PixPat record {data structure describing pattern}
- patType [2 bytes] = 1 (full color pattern)
- patMap [4 bytes] = offset to pixMap record
- patData [4 bytes] = offset to pixel data
- patXData [4 bytes] = 0
- patXValid [2 bytes] = –1
- patXMap [4 bytes] = 0
- pat1Data [8 bytes] = 1 bit pattern data
- PixMap { pixMap describing pattern’s pixel image }
- baseAddr [4 bytes] = 0
- rowBytes [2 bytes] = rowBytes of image
- bounds [8 bytes] = boundary rectangle of image
- pmVersion [2 bytes] = 0
- packType [2 bytes] = 0
- packSize [4 bytes] = 0
- hRes [4 bytes] = $00480000
- vRes [4 bytes] = $00480000
- pixelType [2 bytes] = 0 = chunky
- pixelSize [2 bytes] = bits per pixel in image
- cmpCount [2 bytes] = 1
- cmpSize [2 bytes] = pixelsize
- planeBytes [4 bytes] = 0
- pmTable [4 bytes] = offset to color table data
- pmReserved [4 bytes] = 0
- pixel data [see below] data for pattern
- color table data [see below] data for color table
-
- The patMap field of the pixPat record contains an offset to the pixMap record from
- the beginning of the resource data. The patData field of the pixPat record contains
- an offset to the pixel data from the beginning of the resource data. The pmTable
- field of the pixMap record contains an offset to the color table data from the beginning
- of the resource data. The size of the pixelData is calculated by subtracting the
- offset to the pixel data from the offset to the color table data. The color table
- data consists of a color table record
- (ctSeed, ctFlags, ctSize) followed by ctSize+1 color table entries. Each entry in the
- color table connects a pixel value used in the pixel data to an actual RGB.
-
- æKY SICN
- æC /*----------------------------SICN • Small Icon-----------------------------------------*/
- type 'SICN' {
- array {
- hex string[32]; /* SICN data */
- };
- };
- æKY SIZE
- æC /*----------------------------SIZE • MultiFinder Size Information-----------------------*/
- type 'SIZE' {
- boolean dontSaveScreen, /* for SWITCHER */
- saveScreen; /* compatibility */
- boolean ignoreSuspendResumeEvents, /* suspend-resume */
- acceptSuspendResumeEvents;
- boolean enableOptionSwitch, /* for SWITCHER */
- disableOptionSwitch; /* compatibility */
- boolean cannotBackground,
- canBackground; /* Can properly use back-
- ground null events */
- boolean notMultiFinderAware, /* activate/deactivate */
- multiFinderAware; /* on resume/suspend */
- boolean backgroundAndForeground, /* Application does not */
- onlyBackground; /* have a user interface*/
- boolean dontGetFrontClicks, /* Get mouse down/up */
- getFrontClicks; /* when suspended */
- boolean ignoreChildDiedEvents, /* Apps use this. */
- acceptChildDiedEvents; /* Debuggers use this. */
- boolean not32BitCompatible, /* Works with 24bit addr*/
- is32BitCompatible; /* Works with 24 or 32 */
- /* bit addresses */
- #undef reserved
- boolean reserved; /* These seven bits are */
- boolean reserved; /* reserved. Set them */
- boolean reserved; /* to "reserved". When */
- boolean reserved; /* we decide to define */
- boolean reserved; /* a new flag, your */
- boolean reserved; /* old resource will */
- boolean reserved; /* still compile. */
-
- /* Memory sizes are in bytes */
- unsigned longint; /* preferred mem size */
- unsigned longint; /* minimum mem size */
-
- // If we ever define one of the seven reserved bits above, the "reserved"
- // enumeration wouldn't appear on the newly defined bit. By defining "reserved"
- // below, old resource SIZE declarations will still compile.
- #define reserved false
- };
- æKY STR
- æC /*----------------------------STR • Pascal-Style String--------------------------------*/
- type 'STR ' {
- pstring; /* String */
- };
- æKY STR#
- æC /*----------------------------STR# • Pascal-Style String List---------------------------*/
- type 'STR#' {
- integer = $$Countof(StringArray);
- array StringArray {
- pstring; /* String */
- };
- };
- æKY wctb
- æC /*----------------------------wctb • Window Color Lookup Table--------------------------*/
- type 'wctb' as 'actb';
- æKY WIND
- æC /*----------------------------WIND • Window Template------------------------------------*/
- type 'WIND' {
- rect; /* boundsRect */
- integer documentProc, /* procID */
- dBoxProc,
- plainDBox,
- altDBoxProc,
- noGrowDocProc,
- zoomDocProc = 8,
- zoomNoGrow = 12,
- rDocProc = 16;
- byte invisible, visible; /* visible */
- fill byte;
- byte noGoAway, goAway; /* goAway */
- fill byte;
- unsigned hex longint; /* refCon */
- pstring Untitled = "Untitled"; /* title */
- };
- æKY DRVR
- æC /*----------------------------DRVR • Driver---------------------------------------------*/
- type 'DRVR' {
- boolean = 0;
- boolean dontNeedLock, needLock; /* lock drvr in memory */
- boolean dontNeedTime, needTime; /* for periodic action */
- boolean dontNeedGoodbye, needGoodbye; /* call before heap reinit*/
- boolean noStatusEnable, statusEnable; /* responds to status */
- boolean noCtlEnable, ctlEnable; /* responds to control */
- boolean noWriteEnable, writeEnable; /* responds to write */
- boolean noReadEnable, readEnable; /* responds to read */
- byte = 0;
- integer; /* driver delay */
- unsigned hex integer; /* desk acc event mask */
- integer; /* driver menu */
- unsigned hex integer; /* offset to open */
- unsigned hex integer; /* offset to prime */
- unsigned hex integer; /* offset to control */
- unsigned hex integer; /* offset to status */
- unsigned hex integer; /* offset to close */
- pstring; /* driver name */
- hex string; /* driver code */
- };
- æKY finf
- æC /*----------------------------finf • Font Family Description----------------------------*/
- type 'finf' {
- integer = $$CountOf(Fonts); /* # of fonts */
- array Fonts {
- integer; /* Font Number */
- unsigned hex integer plain; /* Font Style */
- integer; /* Font Size */
- };
- };
-
- æKY FOND
- æC /*----------------------------FOND • Font Family Description----------------------------*/
- /* Note: this FOND resource definition only works when the tables at the end of the
- resource are in this order: 1 - Family Character-Width Table
- 2 - Style Mapping Table
- 3 - Kerning Tables
- */
- type 'FOND' {
- /* Flags Word */
- boolean proportionalFont, fixedWidthFont;
- boolean useFractWidthTable, dontUseFractWidthTable;
- boolean computeFixedPointExtra, useIntegerExtra;
- boolean useFractEnable, ignoreFractEnable;
- boolean canAdjustCharSpacing, dontAdjustCharSpacing;
- unsigned hex bitstring[9] = 0; /* Reserved */
- boolean noCharWidthTable, hasCharWidthTable;
- boolean noImageHeightTable, hasImageHeightTable;
-
- integer; /* Family ID number */
- First:
- integer; /* first char */
- Last:
- integer; /* last char */
- integer; /* Ascent */
- integer; /* Descent */
- integer; /* Leading */
- integer; /* Width Max */
- WidthOffset:
- unsigned hex longint = WidthTable[1] >> 3; /* Width table offset */
- KerningOffset:
- unsigned hex longint = KerningTable[1] >> 3; /* Kerning table offset */
- StyleMapOffset:
- unsigned hex longint = StyleTable[1] >> 3; /* Style map offset */
- integer; /* reserved */
- integer; /* ex wid bold */
- integer; /* ex wid italic */
- integer; /* ex wid underline */
- integer; /* ex wid outline */
- integer; /* ex wid shadow */
- integer; /* ex wid condensed */
- integer; /* ex wid extended */
- integer; /* reserved */
- longint; /* reserved for intl */
- Version:
- integer; /* version */
-
- /* Font Association Table */
- integer = $$CountOf(FontEntries)-1; /* # of font entries */
- wide array FontEntries {
- integer; /* Font size */
- integer; /* Font style */
- integer; /* Resource ID of FONT */
- };
- /* */
- array [$$Word(Version) == 2] {
- OffsetTableStart:
- integer = $$CountOf(OffsetTable) - 1;
- array OffsetTable {
- longint = (BBoxStart[1] - OffsetTableStart[1]) >> 3;
- };
- /* Font Bounding Box Table */
- BBoxStart:
- integer = $$CountOf(BBoxTable) - 1;
- wide array BBoxTable {
- fill bit[9]; /* Reserved */
- Boolean noExtendedStyle, EXTENDEDstyle; /* Extended style */
- Boolean noCondensedStyle, CONDENSEDstyle; /* Condensed style */
- Boolean noShadowStyle, SHADOWstyle; /* Shadow style */
- Boolean noOutlineStyle, OUTLINEstyle; /* Outline style */
- Boolean noUnderline, UNDERLINEstyle; /* Underline style */
- Boolean noItalicStyle, ITALICstyle; /* Italic style */
- Boolean noBoldStyle, BOLDstyle; /* Bold style */
- Rect;
- };
- };
-
- /* Family Character-Width Table */
- /* This outer array below handles the case when the width table offset (WidthOffset:)
- is zero. */
- array [$$Long(WidthOffset) != 0] {
- WidthTable:
- integer = $$CountOf(WidthTable) - 1; /* # of width tables */
- wide array WidthTable {
- fill bit[9]; /* Reserved */
- Boolean noExtendedStyle, EXTENDEDstyle; /* Extended style */
- Boolean noCondensedStyle, CONDENSEDstyle; /* Condensed style */
- Boolean noShadowStyle, SHADOWstyle; /* Shadow style */
- Boolean noOutlineStyle, OUTLINEstyle; /* Outline style */
- Boolean noUnderline, UNDERLINEstyle; /* Underline style */
- Boolean noItalicStyle, ITALICstyle; /* Italic style */
- Boolean noBoldStyle, BOLDstyle; /* Bold style */
-
- wide array [$$Word(Last) - $$Word(First) + 3] {
- unsigned hex integer; /* Width of character */
- };
- };
- };
-
- /* Style Mapping Table */
- /* This outer array below handles the case when the width table offset (WidthOffset:)
- is zero. */
- array [$$Long(StyleMapOffset) != 0] {
- StyleTable:
- unsigned hex integer; /* Font class */
- CharCodeOffset:
- unsigned hex longint = /* Encoding table offset*/
- (CharCodeTable[1,1] - StyleTable[1]) / 8 * (CharCodeTable[1,1] != 0);
- fill long; /* Reserved */
- array [48] {
- byte;
- };
- /* Style Name Table */
- integer = $$CountOf(StyleNames); /* Number of strings */
- pstring; /* Full base font name */
- array StyleNames {
- pstring; /* Style suffix names */
- };
-
- /* Character Set Encoding Table */
- /* This outer array below handles the case when the character set encoding
- offset is zero (CharCodeOffset:) */
- array [$$Long(CharCodeOffset[1]) != 0] {
- CharCodeTable:
- integer = $$CountOf(CharacterCodes); /* Number of entries */
- wide array CharacterCodes {
- char; /* Character code */
- pstring; /* Char name string */
- };
- };
- };
-
- /* Kerning Tables */
- /* This outer array below handles the case when the kerning table offset
- (KerningOffset:) is zero. */
- array [$$Long(KerningOffset) != 0] {
- /* Kerning Tables */
- KerningTable:
- integer = $$CountOf(KerningTables) - 1; /* Number of tables */
- wide array KerningTables {
- fill bit[9]; /* Reserved */
- Boolean noExtendedStyle, EXTENDEDstyle; /* Extended style */
- Boolean noCondensedStyle, CONDENSEDstyle; /* Condensed style */
- Boolean noShadowStyle, SHADOWstyle; /* Shadow style */
- Boolean noOutlineStyle, OUTLINEstyle; /* Outline style */
- Boolean noUnderline, UNDERLINEstyle; /* Underline style */
- Boolean noItalicStyle, ITALICstyle; /* Italic style */
- Boolean noBoldStyle, BOLDstyle; /* Bold style */
- integer = $$CountOf(KerningTableEntry); /* # of entries */
- wide array KerningTableEntry {
- char; /* first char of pair */
- char; /* second char of pair */
- unsigned hex integer; /* kerning offset */
- };
- };
- };
- };
- _______________________________________________________________________________
-
- »FONTS AND THEIR FAMILIES
- _______________________________________________________________________________
-
- Note: The extensions to the Font Manager described in the following section
- were originally documented in Inside Macintosh, Volume IV. As such,
- this information refers to the 128K ROMs and System file version 3.2
- and later.
-
- In the 64K ROM version of the Font Manager, font is defined as the complete set of
- characters of one typeface; it doesn’t include the size of the characters, and usually
- doesn’t include any stylistic variations. In other words, fonts are defined in the
- plain style and stylistic variations, such as bold and italic, are applied to them.
- For example, Times plain (or roman) defines the font, while Times italic is a stylistic
- variation applied to that font.
-
- In the 128K ROM version, the definition of a font is broadened to include stylistic
- variations. That is, a separate font can be defined for certain stylistic variations
- of a typeface. The set of available fonts for a given typeface is known as a font
- family.
-
- This allows QuickDraw to use an actual font instead of modifying a plain font, thereby
- improving speed and readability. For example, suppose the user of a word processor
- selects a phrase in 12-point Times Roman and chooses the italic style from a menu.
- QuickDraw asks for an italic Times and, assuming that the proper resources are available,
- the Font Manager returns a 12-point Times Italic font. QuickDraw could then draw the
- phrase from an actual italic font rather than having to slant the plain font.
-
- Note: The standard stylistic variations will still be performed by
- QuickDraw when they’re not available as actual fonts.
-
- Information about fonts and their families is stored as resources in resource files;
- the Font Manager calls the Resource Manager to read them into memory. Fonts are
- stored as resources of type 'FONT' or 'NFNT'. Fonts known to the system are stored in
- the system resource file; you may also define your own fonts and include them in your
- application’s resource file. The information about a font family is stored as a
- resource of type 'FOND'; this includes the resource IDs of all the fonts in the
- family, as shown in Figure 2.
-
- •••Refer to Figure 2.•••
-
- Figure 2–Font Manager Resources
-
- •••Refer to Technical Note #198:•••
-
- The 'NFNT' resource is new to the 128K ROM version of the Font Manager; it has the
- same format as the 'FONT' resource and allows for many more fonts. An 'NFNT' resource
- type can also be used to mask all but plain fonts from appearing in a font menu. In
- this way, the system resource file can contain Times, Times Italic, Times Bold, and
- Times Bold Italic, yet only Times will appear on the Font Menu. (The user would need
- to choose Italic from the Style menu.)
-
- The 64K ROM can only handle 'FONT' resources; it ignores resources of type
- 'NFNT' and 'FOND'.
-
- Warning: If you’re creating a font, be sure to read the section
- “Restrictions on the 'FONT' type” below for information
- on maintaining compatibility with the 64K ROMs.
-
- It’s crucial that all new fonts have a corresponding 'FOND' resource. A minimal
- 'FOND' resource can be made for a font by using the Font/DA Mover (version 3.0 or
- later) to copy the font into a different file that has no font with the same name.
-
- Note: A 'FOND' resource created this way does not contain any optional
- tables, but it does contain the font association table (described
- below) that maps family numbers and font sizes into resource IDs.
-
- Warning: Be aware that when a 'FOND' is present, the Font Manager uses
- it exclusively to determine which fonts are available. Fonts
- should be added to or deleted from the System file with a tool
- like the Font/DA Mover, which correctly updates the 'FOND' as
- well as the 'FONT'.
-
- The Font Manager uses these resources to build two data structures in the application
- heap. The font record contains information about a font and the family record contains
- information about a font family.
-
- »Restrictions on the 'FONT' Type
-
- For backward compatibility, all 'FONT' resources that are part of a 'FOND' have
- certain restrictions:
-
- 1. The font name and family name must be identical.
- 2. The font number and family number must be identical since the
- Font Manager interprets a family number as a font number.
- 3. The resource ID of the font must be the same number that would
- be produced by concatenating the font number and the font size.
-
- These restrictions ensure that both the 64K ROM and 128K ROM versions of the Font
- Manager will associate the family number and point size with the proper corresponding
- font resource ID, whether or not there’s a family resource. 'NFNT' resources are not
- bound by these restrictions (but neither will they be found by the 64K ROM version of
- the Font Manager).
-
- æKY FONT
- æC /*----------------------------FONT • Font Description-----------------------------------*/
- /* PROBLEMS: the offset to the offset/width table has been changed to a longint, with the
- high word stored in the neg descent field (if its not -1). Rez can't handle
- this. */
- type 'FONT' {
- /* Font Type Flags */
- FontType:
- boolean = 1; /* Reserved */
- boolean doExpandFont, dontExpandFont;
- boolean proportionalFont, fixedWidthFont;
- boolean = 1; /* Reserved */
- unsigned bitstring[2] = 0; /* Reserved */
- boolean blackFont, colorFont;
- boolean notSynthetic, isSynthetic;
- boolean nofctbRsrc, hasfctbRsrc;
- unsigned bitstring[3] = 0; /* Reserved */
- unsigned bitstring[2] oneBit, twoBit, /* Font depth */
- fourBit, eightBit;
- boolean noCharWidthTable, hasCharWidthTable;
- boolean noImageHeightTable, hasImageHeightTable;
-
- FirstChar:
- integer; /* first char */
- LastChar:
- integer; /* last char */
- integer; /* width max */
- integer; /* kern max */
- integer; /* neg descent */
- integer; /* font rect width */
- Height:
- integer; /* font rect height */
- Offset:
- unsigned integer = ((WidthTable-Offset)/16); /* offset to off/wid tab*/
- integer; /* ascent */
- integer; /* descent */
- integer; /* leading */
- RowWords:
- integer; /* row width (in words) */
-
- /* Tables */
- /* Bit image */
- hex string [($$Word(RowWords) <<($$BitField(FontType, 12, 2)
- & 3) + 1) * $$Word(Height)];
-
- /* Location Table */
- array [$$Word(LastChar) - $$Word(FirstChar) + 3] {
- integer;
- };
-
- /* Offset/Width Table */
- WidthTable:
- array [$$Word(LastChar) - $$Word(FirstChar) + 3] {
- integer;
- };
- };
- _______________________________________________________________________________
-
- »FONTS AND THEIR FAMILIES
- _______________________________________________________________________________
-
- Note: The extensions to the Font Manager described in the following section
- were originally documented in Inside Macintosh, Volume IV. As such,
- this information refers to the 128K ROMs and System file version 3.2
- and later.
-
- In the 64K ROM version of the Font Manager, font is defined as the complete set of
- characters of one typeface; it doesn’t include the size of the characters, and usually
- doesn’t include any stylistic variations. In other words, fonts are defined in the
- plain style and stylistic variations, such as bold and italic, are applied to them.
- For example, Times plain (or roman) defines the font, while Times italic is a stylistic
- variation applied to that font.
-
- In the 128K ROM version, the definition of a font is broadened to include stylistic
- variations. That is, a separate font can be defined for certain stylistic variations
- of a typeface. The set of available fonts for a given typeface is known as a font
- family.
-
- This allows QuickDraw to use an actual font instead of modifying a plain font, thereby
- improving speed and readability. For example, suppose the user of a word processor
- selects a phrase in 12-point Times Roman and chooses the italic style from a menu.
- QuickDraw asks for an italic Times and, assuming that the proper resources are available,
- the Font Manager returns a 12-point Times Italic font. QuickDraw could then draw the
- phrase from an actual italic font rather than having to slant the plain font.
-
- Note: The standard stylistic variations will still be performed by
- QuickDraw when they’re not available as actual fonts.
-
- Information about fonts and their families is stored as resources in resource files;
- the Font Manager calls the Resource Manager to read them into memory. Fonts are
- stored as resources of type 'FONT' or 'NFNT'. Fonts known to the system are stored in
- the system resource file; you may also define your own fonts and include them in your
- application’s resource file. The information about a font family is stored as a
- resource of type 'FOND'; this includes the resource IDs of all the fonts in the
- family, as shown in Figure 2.
-
- •••Refer to Figure 2.•••
-
- Figure 2–Font Manager Resources
-
- •••Refer to Technical Note #198:•••
-
- The 'NFNT' resource is new to the 128K ROM version of the Font Manager; it has the
- same format as the 'FONT' resource and allows for many more fonts. An 'NFNT' resource
- type can also be used to mask all but plain fonts from appearing in a font menu. In
- this way, the system resource file can contain Times, Times Italic, Times Bold, and
- Times Bold Italic, yet only Times will appear on the Font Menu. (The user would need
- to choose Italic from the Style menu.)
-
- The 64K ROM can only handle 'FONT' resources; it ignores resources of type
- 'NFNT' and 'FOND'.
-
- Warning: If you’re creating a font, be sure to read the section
- “Restrictions on the 'FONT' type” below for information
- on maintaining compatibility with the 64K ROMs.
-
- It’s crucial that all new fonts have a corresponding 'FOND' resource. A minimal
- 'FOND' resource can be made for a font by using the Font/DA Mover (version 3.0 or
- later) to copy the font into a different file that has no font with the same name.
-
- Note: A 'FOND' resource created this way does not contain any optional
- tables, but it does contain the font association table (described
- below) that maps family numbers and font sizes into resource IDs.
-
- Warning: Be aware that when a 'FOND' is present, the Font Manager uses
- it exclusively to determine which fonts are available. Fonts
- should be added to or deleted from the System file with a tool
- like the Font/DA Mover, which correctly updates the 'FOND' as
- well as the 'FONT'.
-
- The Font Manager uses these resources to build two data structures in the application
- heap. The font record contains information about a font and the family record contains
- information about a font family.
-
- »Restrictions on the 'FONT' Type
-
- For backward compatibility, all 'FONT' resources that are part of a 'FOND' have
- certain restrictions:
-
- 1. The font name and family name must be identical.
- 2. The font number and family number must be identical since the
- Font Manager interprets a family number as a font number.
- 3. The resource ID of the font must be the same number that would
- be produced by concatenating the font number and the font size.
-
- These restrictions ensure that both the 64K ROM and 128K ROM versions of the Font
- Manager will associate the family number and point size with the proper corresponding
- font resource ID, whether or not there’s a family resource. 'NFNT' resources are not
- bound by these restrictions (but neither will they be found by the 64K ROM version of
- the Font Manager).
-
- æKY FWID
- æC /*----------------------------FWID • Font Width Table-----------------------------------*/
- type 'FWID' {
- unsigned hex integer; /* Font type */
- integer; /* first char */
- integer; /* last char */
- integer; /* width max */
- integer; /* kern max */
- integer; /* neg descent */
- integer; /* font rect width */
- integer; /* font rect height */
- unsigned hex integer; /* offset to off/wid tab*/
- integer; /* ascent */
- integer; /* descent */
- integer; /* leading */
- integer; /* row width (in words) */
- wide array { /* offset/width table */
- byte; /* char offset */
- byte; /* char width */
- };
- };
-
- A resource type can be defined that consists of only the character widths and general
- font information—everything but the font’s bit image and location table. If this
- 'FWID' resource type exists, it will be read in whenever QuickDraw doesn’t need to
- draw the text, such as when you call one of the routines CharWidth, HidePen, or
- OpenPicture (which calls HidePen). The FontRec data type described above, minus the
- rowWords, bitImage, and locTable fields, reflects the structure of the 'FWID' resource
- type. The owTLoc field will contain 4, and the fontType field will contain the following
- predefined constant:
-
- CONST fontWid = $ACB0; {font width data}
-
- Note: The extensions to the Font Manager described in the following paragraphs
- were originally documented in Inside Macintosh, Volume IV. As such,
- this information refers to the 128K ROMs and System file version 3.2
- and later.
-
- To maintain compatibility with existing applications, the order of the fields in the
- font record remains unchanged; two variable-length arrays are added at the end of the
- record, however, to implement fractional character widths.
-
- Number of bytes Contents
-
- m bytes Optional character-width table of font
- m = 2 * (lastChar–firstChar+3)
- m bytes Optional image-height table of font
- m = 2 * (lastChar–firstChar+3)
-
- The various sizes of a font are each stored as separate resources. The resource type
- for a font is either 'FONT' or 'NFNT', which is simply the original font record with
- the two additional variable-length arrays added at the end of the record.
-
- Additional constants have been defined for use in the fontType field; it can now
- contain any of the following values:
-
- CONST propFont = $9000; {proportional font}
- prpFntH = $9001; { with height table}
- prpFntW = $9002; { with width table}
- prpFntHW = $9003; { with height & width tables}
-
- fixedFont = $B000; {fixed-width font}
- fxdFntH = $B001; { with height table}
- fxdFntW = $B002; { with width table}
- fxdFntHW = $B003; { with height & width tables}
-
- fontWid = $ACB0; {font width data: 64K ROM only}
-
- The low-order two bits of the fontType field tell whether the two optional tables are
- present. If bit 0 is set, there’s an image-height table; if bit 1 is set, there’s a
- character width table.
-
- The optional character-width table immediately follows the offset/width table; it’s a
- variable-length array specifying the fixed-point character widths for each character
- in the font. Each entry is a word in length. For compactness, a special 16-bit fixed-point
- format is used with an unsigned integer part in the high-order byte and a fractional
- part in the low-order byte.
-
- •••Refer to Technical Note #30:•••
-
- The optional image-height table, which speeds the drawing of characters, may also be
- appended after the character-width table; it’s a variable-length array specifying the
- image height of each character in the font. Each entry is a word in length; the
- high-order byte is the offset of the first non-white row in the character; the low-order
- byte is the number of rows that must be drawn. The image height is the height of the
- character image and is less than or equal to the font height; it’s used in conjunction
- with QuickDraw for improved character plotting. Most font resources don’t contain
- this table; it’s typically generated by the Font Manager when the font is swapped
- in.
-
- Note: The 64K ROM version of the Resource Manager limits the total space
- occupied by the bit image, location table, offset/width table, and
- character-width and image-height tables to 32K bytes. For this reason,
- the practical limit on the font size of a full font is about 40 points.
-
- Note: The extensions to the Font Manager described in the following paragraphs
- were originally documented in Inside Macintosh, Volume V. As such,
- this information refers to the Macintosh SE and Macintosh II ROMs and
- System file version 4.1 and later.
-
- Several previously unused bits of the fontType field specify the font depth and other
- related information (the new bits are marked by an asterisk):
-
- Bit Meaning
-
- 0 Set if there’s an image-height table
- 1 Set if there’s a character-width table
- * 2–3 Font depth (Macintosh II only—must be 0 otherwise)
- 4–6 Reserved (should be 0)
- * 7 Set if font has an 'fctb' resource (Macintosh II
- only—must be 0 otherwise)
- * 8 Set if a synthetic font (Macintosh II only—must be 0 otherwise)
- * 9 Set if font contains colors other than black (Macintosh II
- only—must be 0 otherwise)
- 10–11 Reserved (should be 0)
- 12 Reserved (should be 1)
- 13 Set for fixed-width font, clear for proportional font
- * 14 Set if font is not to be expanded (Macintosh II
- only—must be 0 otherwise)
- 15 Reserved (should be 1)
-
- Bit 2 and 3 specify the font depth and can contain the following values:
-
- Value Font depth
- 0 1-bit
- 1 2-bit
- 2 4-bit
- 3 8-bit
-
- The font depth is normally 0, indicating a font intended for a screen one bit deep.
- If bit 7 is set (and the font is an 'NFNT' resource), a resource of type 'fctb' with
- the same ID as the font can optionally be provided to assign RGB colors to specific
- pixel values.
-
- Bit 8 is used only by the Font Manager to indicate a synthetic font, created dynamically
- from the available font resources in response to a certain color and screen depth
- combination.
-
- Bit 9 is set if the font contains other than black.
-
- Setting bit 14 indicates that the font should not be expanded by the Font Manager to
- match the screen depth; some international fonts, such as kanji, are too large for
- synthetic fonts to be effective or meaningful.
-
- To accommodate multibit font depths, the owTLoc field has been changed to a long
- word, the nDescent field becoming the high-order word. (For backward compatibility,
- nDescent is ignored if it’s negative.)
-
- Note: The 128K ROM version of the Font Manager limits the strike for a
- 1-bit font to not quite 128K; this limits the largest practical
- font to about 127 points. The Macintosh II ROM limits the largest
- practical font to about 255 points, regardless of the font depth.
-
- æKY insc
- æC /*----------------------------insc • Installer Script-----------------------------------*/
- #define CommFlags \
- boolean noDelRemove, delRemove; /* Remove file if remove clicked*/ \
- boolean noDelInstall, delInstall; /* Delete target before copy */ \
- boolean noCopy, copy; /* Copy file to destination */ \
- fill bit[3]; /* Reserved */ \
- boolean doReplace, dontReplace; /* Replace */ \
- fill bit[1]; /* Reserved */ \
- boolean old, noOld; /* Type & creator need not match*/ \
- boolean noUpdateOnly, updateOnly /* Only update if target exists */
-
- #define FileSpecFlags \
- CommFlags; \
- boolean noRsrcFork, rsrcFork; /* Apply operation to rsrc fork */ \
- boolean noDataFork, dataFork; /* Apply operation to data fork */ \
- boolean needExist, needNotExist; /* File need not exist */ \
- boolean noCrDate, crDate; /* Creation date must match */ \
- boolean noTypeCr, typeCr; /* Type and creator must match */ \
- bitstring[1] = 1 /* Indicates file specification */
-
- #define RsrcSpecFlags \
- CommFlags; \
- fill bit; /* Reserved */ \
- boolean noEvenIf, evenIf; /* Do it even if rsrc protected */ \
- boolean needExist, needNotExist; /* Rsrc need not exist */ \
- fill bit; /* Reserved */ \
- boolean noByID, byID; /* Use name or id to find rsrc */ \
- bitstring[1] = 0 /* Indicates rsrc specification */
-
- #define FileSpec \
- FileSpecFlags; /* FileSpec Flags */ \
- literal longint; /* File Type */ \
- literal longint; /* File Creator */ \
- unsigned hex longint; /* Creation Date, use \
- $$DateToLongInt() to read in \
- the date. */ \
- fill long[3]; /* Handle, FDelSize, FAddSize */ \
- pstring; /* File Name */ \
- align word
-
- type 'insc' {
- switch {
- case format0:
- key integer = 0; /* Script Format */
- hex integer = 0; /* Script Flags */
- pstring; /* Script Name */
- align word;
- wstring; /* Script Help */
- align word;
- unsigned integer = $$CountOf(FileList); /* File List */
- wide array FileList {
- FileSpec; /* File Spec */
- };
- unsigned integer = $$CountOf(ResFileList); /* Resource File List */
- wide array ResFileList {
- FileSpec; /* Target File Spec */
- integer = $$CountOf(SrcFileList); /* Source File List */
- wide array SrcFileList {
- FileSpec; /* Source File Spec */
- unsigned integer = $$CountOf(ResList); /* Resource List */
- wide array ResList {
- RsrcSpecFlags; /* Resource Spec Flags */
- literal longint; /* Resource Type */
- integer; /* Source ID */
- integer; /* Target ID */
- fill word[2]; /* CRC/Version, Filler1 */
- fill long[3]; /* Filler2, RDelSize,
- RAddSize */
- pstring; /* Resource Name */
- align word;
- integer = 0; /* Previous CRC List */
- };
- };
- };
- integer = 0; /* Disk Blocks */
-
- case format1:
- key integer = 1; /* Script Format */
- hex integer = 0; /* Script Flags */
- pstring; /* Script Name */
- align word;
- wstring; /* Script Help */
- align word;
- unsigned integer = $$CountOf(FileList); /* File List */
- wide array FileList {
- FileSpec; /* File Spec */
- };
- unsigned integer = $$CountOf(ResFileList); /* Resource File List */
- wide array ResFileList {
- FileSpec; /* Target File Spec */
- integer = $$CountOf(SrcFileList); /* Source File List */
- wide array SrcFileList {
- FileSpec; /* Source File Spec */
- unsigned integer = $$CountOf(ResList); /* Resource List */
- wide array ResList {
- RsrcSpecFlags; /* Resource Spec Flags */
- literal longint; /* Resource Type */
- integer; /* Source ID */
- integer; /* Target ID */
- fill word[2]; /* CRC/Version, Filler1 */
- fill long[3]; /* Filler2, RDelSize,
- RAddSize */
- pstring; /* Resource Name */
- align word;
- integer = 0; /* Previous CRC List */
- };
- };
- };
- unsigned integer; /* Boot Block Version */
- unsigned integer; /* Number of Open Files */
- unsigned integer; /* Number of Events */
- unsigned hex longint; /* Sys Heap Size 128K */
- unsigned hex longint; /* Sys Heap Size 256K */
- unsigned hex longint; /* Sys Heap Size 512K */
- };
- };
- æKY INTL0
- æC /*----------------------------INTL (0) • International Formatting Information-----------*/
- type 'INTL' (0) {
- char period = periodSymbol; /* decimal pt sep */
- char comma = commaSymbol; /* thousands sep */
- char semicolon = semicolonSymbol; /* list sep */
- char dollarsign = dollarsignSymbol; /* currSym1 */
- char; /* currSym2 */
- char; /* currSym3 */
-
- /* currFmt */
- boolean noLeadZero, leadingZero; /* leading unit zero */
- boolean noTrailingZero, trailingZero; /* trailing dec zero */
- boolean paren, minusSign; /* negative rep */
- boolean trails, leads; /* curr sym position */
- fill bit[4]; /* not used */
- byte monDayYear, dayMonYear, yearMonDay; /* dateOrder */
-
- /* shrtDateFmt */
- boolean noCentury, century; /* century incl */
- boolean noMonthLeadZero, monthLeadZero; /* mon lead zero */
- boolean noDayLeadZero, dayLeadZero; /* day lead zero */
- fill bit[5]; /* filler */
- char slash = slashSymbol; /* date sep */
- byte twentyFourHour, twelveHour = 255; /* timeCycle */
-
- /* timeFmt */
- boolean noHoursLeadZero, hoursLeadZero; /* hours lead zero */
- boolean noMinutesLeadZero, minutesLeadZero; /* min lead zero */
- boolean noSecondsLeadZero, secondsLeadZero; /* sec lead zero */
- fill bit[5]; /* filler */
- string[4]; /* mornStr */
- string[4]; /* eveStr */
- char; /* timeSep */
- char; /* time1Stuff */
- char; /* time2Stuff */
- char; /* time3Stuff */
- char; /* time4Stuff */
- char; /* time5Stuff */
- char; /* time6Stuff */
- char; /* time7Stuff */
- char; /* time8Stuff */
- byte standard, metric = 255; /* metricSys */
- byte Country; /* INTL0 country */
- byte; /* version */
- };
- æKY itl0
- æC /*----------------------------itl0 • International Formatting Information---------------*/
- type 'itl0' as 'INTL' (0);
- æKY INTL1
- æC /*----------------------------INTL (1) • International Date/Time Information------------*/
- type 'INTL' (1) {
- /* Day names */
- array [7] {
- pstring[15]; /* Sunday, Monday... */
- };
-
- /* Month names */
- array [12] {
- pstring[15]; /* January, February... */
- };
-
- byte dayName, none=255; /* suppressDay */
- byte dayMonYear, monDayYear = 255; /* longDate format */
- byte noDayLeadZero, dayLeadZero = 255; /* dayLeading0 */
- byte; /* abbrLen */
- string[4]; /* st0 */
- string[4]; /* st1 */
- string[4]; /* st2 */
- string[4]; /* st3 */
- string[4]; /* st4 */
- byte Country; /* INTL1 country */
- byte; /* version */
- hex string DefaultReturn = "\$4E\$75"; /* local routine - If
- you have one, use
- $$Resource to insert
- code here. Otherwise,
- you must have a 68000
- return instruction.
- Use DefaultReturn. */
- };
- æKY itl1
- æC /*----------------------------itl1 • International Date/Time Information----------------*/
- type 'itl1' as 'INTL' (1);
- æKY itl2
- æC /*----------------------------itl2 • International String Comparision Package Hooks-----*/
- type 'itl2' {
- /*
- * The type definition for 'itl2' changed between systems 6.0.3 and 6.0.4.
- * If the fourth integer of this type is -1, the resource is of the new type.
- * There's no clean way to merge both definitions into one type that Rez and
- * DeRez could handle. If you're trying to create or decompile a pre-6.0.4
- * 'itl2' resource, add -d SYSTEMVERSION=0x060003 to your Rez or DeRez command.
- */
- #ifndef SYSTEMVERSION
- #define SYSTEMVERSION 0x060004 // version 6.0.4
- #endif
- #if SYSTEMVERSION >= 0x060004
- unsigned integer = initHookOffset >> 3; /* init hook offset */
- unsigned integer = fetchHookOffset >> 3; /* fetch hook offset */
- unsigned integer = vernierHookOffset >> 3; /* vernier hook offset */
- unsigned integer = projectHookOffset >> 3; /* project hook offset */
- integer = -1; /* MODIFIED format flag */
- unsigned integer = rsvd2HookOffset >> 3; /* rsvd2 hook offset */
-
- /* new offsets, for new tables */
- unsigned integer = typeListOffset >> 3; /* TypeList offset */
- unsigned integer = classArrayOffset >> 3; /* ClassArray offset */
- unsigned integer = upperListOffset >> 3; /* UpperList offset */
- unsigned integer = lowerListOffset >> 3; /* LowerList offset */
- unsigned integer = upperNoMarkListOffset >> 3; /* UpperNoMarkList offset */
- unsigned integer = wordTableOffset >> 3; /* WordTable offset */
- unsigned integer = wrapTableOffset >> 3; /* WrapTable offset */
- unsigned integer = noMarkListOffset >> 3; /* NoMarkList offset */
- unsigned hex integer; /* version number */
- unsigned integer; /* reserved */
-
- /* the current routines */
- initHookOffset:
- hex string [(fetchHookOffset - initHookOffset) >> 3]; /* code */
- fetchHookOffset:
- hex string [(vernierHookOffset - fetchHookOffset) >> 3]; /* code */
- vernierHookOffset:
- hex string [(projectHookOffset - vernierHookOffset) >> 3]; /* code */
- projectHookOffset:
- hex string [(rsvd2HookOffset - projectHookOffset) >> 3]; /* code */
- /* no rsvd1Hook label in new format */
- /* no rsvd1Hook code in new format */
- rsvd2HookOffset:
- hex string [(classArrayOffset - rsvd2HookOffset) >> 3]; /* code */
-
- /* the new tables; note that order is different than the offset order above */
- classArrayOffset:
- hex string [(typeListOffset - classArrayOffset) >> 3]; /* table */
- typeListOffset:
- hex string [(upperListOffset - typeListOffset) >> 3]; /* table */
- upperListOffset:
- hex string [(lowerListOffset - upperListOffset) >> 3]; /* table */
- lowerListOffset:
- hex string [(upperNoMarkListOffset - lowerListOffset) >> 3]; /* table */
- upperNoMarkListOffset:
- hex string [(noMarkListOffset - upperNoMarkListOffset) >> 3]; /* table */
- noMarkListOffset:
- hex string [(wordTableOffset - noMarkListOffset) >> 3]; /* table */
- wordTableOffset:
- hex string [(wrapTableOffset - wordTableOffset) >> 3]; /* table */
- wrapTableOffset:
- hex string;
- #else
- unsigned integer = initHookOffset >> 3; /* init hook offset */
- unsigned integer = fetchHookOffset >> 3; /* fetch hook offset */
- unsigned integer = vernierHookOffset >> 3; /* vernier hook offset */
- unsigned integer = projectHookOffset >> 3; /* project hook offset */
- unsigned integer = rsvd1HookOffset >> 3; /* Rsvd1 hook offset */
- unsigned integer = rsvd2HookOffset >> 3; /* Rsvd2 hook offset */
- initHookOffset:
- hex string [(fetchHookOffset - initHookOffset) >> 3]; /* init hook code */
- fetchHookOffset:
- hex string [(vernierHookOffset - fetchHookOffset) >> 3];/* fetch hook code */
- vernierHookOffset:
- hex string [(projectHookOffset - vernierHookOffset) >> 3];/* vernier hook code */
- projectHookOffset:
- hex string [(rsvd1HookOffset - projectHookOffset) >> 3];/* project hook code */
- rsvd1HookOffset:
- hex string [(rsvd2HookOffset - rsvd1HookOffset) >> 3]; /* rsvd1 hook code */
- rsvd2HookOffset:
- hex string; /* rsvd2 hook code */
- #endif
- };
-
- æKY itl4
- æC /*----------------------------itl4 • International Tokenizer----------------------------*/
- type 'itl4' {
- unsigned hex integer; /* flags */
- literal longint = 'itl4'; /* resource type */
- integer; /* resource ID */
- integer = $0100; /* version number */
- longint = 0; /* reserved */
- longint = 0; /* reserved */
-
- integer = 8; /* # of table entries */
-
- unsigned longint = mapCharOffset >> 3; /* MapChar offset */
- unsigned longint = stringCopyOffset >> 3; /* stringCopy offset */
- unsigned longint = extendFetchOffset >> 3; /* extendFetch offset */
- unsigned longint = unTokenOffset >> 3; /* unToken offset */
- unsigned longint = defaultPartsTableOffset >> 3; /* defaultParts offset */
- unsigned longint = 0; /* reserved offset */
- unsigned longint = 0; /* reserved offset */
- unsigned longint = 0; /* reserved offset */
- unsigned longint = 0; /* reserved offset */
-
- longint = $$CountOf(MapChar);
- mapCharOffset:
- array MapChar {
- byte;
- };
-
- extendFetchOffset:
- hex string [(stringCopyOffset - extendFetchOffset) >> 3];/* extendFetch code */
- stringCopyOffset:
- hex string [(unTokenOffset - stringCopyOffset) >> 3]; /* stringCopy code */
- unTokenOffset:
- integer = (defaultPartsTableOffset - unTokenOffset) >> 3;/* unToken table size */
- unTokenSize:
- integer = $$CountOf(unToken) - 1;
- array unToken {
- integer; /* offset to token strings*/
- };
- array [$$Word(unTokenSize) + 1] {
- unTokenItemOffset:
- pstring; /* token strings */
- align word;
- };
-
- defaultPartsTableOffset:
- integer = 1; /* version number */
- wide array [31] {
- unsigned byte;
- char;
- };
- integer; /* size */
- wide array [10] {
- unsigned byte;
- char;
- };
- integer; /* size */
- wide array [10] {
- unsigned byte;
- char;
- };
- integer; /* size */
- wide array [10] {
- unsigned byte;
- char;
- };
- integer; /* size */
- wide array [10] {
- unsigned byte;
- char;
- };
- hex string [20] = "";
- };
- _______________________________________________________________________________
-
- »'Itl4' RESOURCE
- _______________________________________________________________________________
-
- There is a new international resource, 'itl4', which contains information used by
- several of the 2.0 routines and must be localized for each script (including Roman).
-
- In Pascal:
-
- Itl4Rec = RECORD
- flags: integer;
- resourceType: longInt;
- resourceNum: integer;
- version: integer;
- resHeader1: longInt;
- resHeader2: longInt;
- numTables: integer; { one-based }
- mapOffset: longInt; { offsets are from record start }
- strOffset: longInt;
- fetchOffset: longInt;
- unTokenOffset: longInt;
- defPartsOffset: longInt;
- resOffset6: longInt;
- resOffset7: longInt;
- resOffset8: longInt;
- { the rest is data pointed to by offsets}
- END;
-
- Itl4Ptr = ^Itl4Rec;
- Itl4Handle = ^Itl4Ptr;
-
- In C:
-
- struct Itl4Rec {
- short flags;
- long resourceType;
- short resourceNum;
- short version;
- long resHeader1;
- long resHeader2;
- short numTables; /*one-based*/
- long mapOffset; /*offsets are from record start*/
- long strOffset;
- long fetchOffset;
- long unTokenOffset;
- long defPartsOffset;
- long resOffset6;
- long resOffset7;
- long resOffset8;
- };
-
- #ifndef __cplusplus
- typedef struct Itl4Rec Itl4Rec;
- #endif
-
- typedef Itl4Rec *Itl4Ptr, **Itl4Handle;
-
- æKY itlb
- æC /*----------------------------itlb • International Script Bundle------------------------*/
- type 'itlb' {
- unsigned integer; /* itl0 id number */
- unsigned integer; /* itl1 id number */
- unsigned integer; /* itl2 id number */
- unsigned hex integer; /* script flags - see
- smScriptFlags info
- in ScriptEqu.a */
- unsigned integer; /* itl4 id number */
- unsigned integer; /* reserved */
- unsigned integer; /* Script language */
- unsigned integer; /* high byte - number
- representation code,
- low byte - date
- representation code */
- unsigned integer; /* KCHR id number */
- unsigned integer; /* SICN id number */
- };
- æKY itlc
- æC /*----------------------------itlc • International Configuration------------------------*/
- type 'itlc' {
- unsigned integer; /* system script code */
- unsigned integer; /* keyboard cache size */
- byte noFontForce, fontForce = 255; /* font force flag */
- byte noIntlForce, intlForce = 255; /* intl force flag */
- byte noOldKeyboard; /* old keyboard */
- unsigned hex byte; /* general flags - see
- smGenFlags info in
- ScriptEqu.a */
- integer; /* script icon offset */
- byte rightOffset, leftOffset = 255; /* menu side for offset */
- byte; /* icon data (rsvd) */
- hex string [36]; /* reserved */
- };
- æKY itlk
- æC /*----------------------------itlk • Keyboard-dependent Remapping-----------------------*/
- type 'itlk' {
- integer = $$CountOf(RemapItemArray);
- wide array RemapItemArray {
- integer; /* keyboard type */
- hex byte; /* old modifier bits */
- byte; /* old key code */
- hex byte; /* modifier bits mask */
- byte; /* key code mask */
- hex byte; /* new modifier bits */
- byte; /* new key code */
- };
- };
- æKY KCAP
- æC /*----------------------------KCAP • Physical Layout of Keyboard------------------------*/
- type 'KCAP' {
- rect; /* boundsRect */
- rect; /* textRect */
- integer = $$CountOf(MainArray);
- array MainArray {
- integer = $$CountOf(ShapeArray) - 1;
- wide array ShapeArray {
- point; /* shapePoint */
- };
- integer = $$CountOf(KeyArray) - 1;
- wide array KeyArray {
- byte; /* mask */
- boolean or, and;
- bitstring[7]; /* keyCode */
- integer; /* dv */
- integer; /* dh */
- };
- };
- };
- æKY KCHR
- æC /*----------------------------KCHR • ASCII Mapping (software)---------------------------*/
- type 'KCHR' {
- integer; /* Version */
- wide array [$100] { /* Indexes */
- byte;
- };
- integer = $$CountOf(TableArray);
- array TableArray {
- wide array [$80] { /* ASCII characters */
- char;
- };
- };
- integer = $$CountOf(DeadArray);
- array DeadArray {
- byte; /* Table number */
- byte; /* Virtual keycode */
- integer = $$CountOf(CompletorArray);
- wide array CompletorArray {
- char; /* Completor char */
- char; /* Substituting char */
- };
- char; /* No match char */
- char; /* 16-bits for the times
- when 8 isn't enough */
- };
- };
- æKY KMAP
- æC /*----------------------------KMAP • Keyboard Mapping (hardware)------------------------*/
- type 'KMAP' {
- integer; /* ID */
- integer; /* Version */
- wide array [$80] { /* Raw to virtual */
- byte; /* keycode map */
- };
- integer = $$CountOf(ExceptionArray);
- wide array ExceptionArray {
- byte; /* Raw keycode */
- boolean noXor, Xor;
- fill bit[3];
- bitstring[4]; /* ADB op */
- pstring;
- };
- };
- æKY KSWP
- æC /*----------------------------KSWP • Keyboard Swapping----------------------------------*/
- type 'KSWP' {
- /* The expression below that calculates the number of elements in the
- array is complicated because of the way that $$ResourceSize works.
- $$ResourceSize returns the size of the resource. When derez'ing a
- resource, the size of the resource is known from the start. When
- rez'ing a resource, however, the size starts out at zero and is
- incremented each time a field is appended to the resource data. In
- other words, while rez'ing, $$ResourceSize rarely returns the final
- size of the resource. When rez'ing a KSWP, the array size expression
- is not evaluated until all of the array elements have been parsed.
- Since each array element is 4 bytes long (if you add up all the fields),
- the number of array elements is the size of the resource at that point
- divided by four. Since the preprocessor value of "DeRez" is zero when
- Rez'ing, the expression is equivalent to $$ResourceSize / 4. When
- derez'ing a KSWP, the value of $$ResourceSize is constant: always the
- total size of the resource, in bytes. Since the resource contains 4
- bytes of fill at the end (which happens to be the size of an array
- element), we have to take that in consideration when calculating the
- size of the array. Note that the preprocessor value of "DeRez" is one,
- when derez'ing.
- */
- wide array [$$ResourceSize / 4 - DeRez]{
- hex integer Roman, Japanese, Chinese, Korean, /* script code or verb */
- Arabic, Hebrew, Greek,
- Rotate = -1, System = -2,
- Alternate = -3;
- unsigned byte; /* virtual key code */
- /* Modifiers */
- fill bit; /* rControlOn,rControlOff*/
- fill bit; /* rOptionOn,rOptionOff */
- fill bit; /* rShiftOn,rShiftOff */
- boolean controlOff, controlOn;
- boolean optionOff, optionOn;
- fill bit; /* capsLockOn,capsLockOff*/
- boolean shiftOff, shiftOn;
- boolean commandOff, commandOn;
- };
- fill long;
- };
- æKY mcky
- æC /*----------------------------mcky • Mouse Tracking-------------------------------------*/
- type 'mcky' {
- array [8] {
- unsigned byte;
- };
- };
- æKY mppc
- æC /*----------------------------mppc • MPP Configuration Resource-------------------------*/
- type 'mppc' {
- unsigned hex longint; /* Info passed to drvr */
- byte; /* Override version # */
- fill byte; /* Reserved */
- };
- æKY NFNT
- æC /*----------------------------NFNT • Font Description-----------------------------------*/
- type 'NFNT' as 'FONT';
-
- A resource type can be defined that consists of only the character widths and general
- font information—everything but the font’s bit image and location table. If this
- 'FWID' resource type exists, it will be read in whenever QuickDraw doesn’t need to
- draw the text, such as when you call one of the routines CharWidth, HidePen, or
- OpenPicture (which calls HidePen). The FontRec data type described above, minus the
- rowWords, bitImage, and locTable fields, reflects the structure of the 'FWID' resource
- type. The owTLoc field will contain 4, and the fontType field will contain the following
- predefined constant:
-
- CONST fontWid = $ACB0; {font width data}
-
- Note: The extensions to the Font Manager described in the following paragraphs
- were originally documented in Inside Macintosh, Volume IV. As such,
- this information refers to the 128K ROMs and System file version 3.2
- and later.
-
- To maintain compatibility with existing applications, the order of the fields in the
- font record remains unchanged; two variable-length arrays are added at the end of the
- record, however, to implement fractional character widths.
-
- Number of bytes Contents
-
- m bytes Optional character-width table of font
- m = 2 * (lastChar–firstChar+3)
- m bytes Optional image-height table of font
- m = 2 * (lastChar–firstChar+3)
-
- The various sizes of a font are each stored as separate resources. The resource type
- for a font is either 'FONT' or 'NFNT', which is simply the original font record with
- the two additional variable-length arrays added at the end of the record.
-
- Additional constants have been defined for use in the fontType field; it can now
- contain any of the following values:
-
- CONST propFont = $9000; {proportional font}
- prpFntH = $9001; { with height table}
- prpFntW = $9002; { with width table}
- prpFntHW = $9003; { with height & width tables}
-
- fixedFont = $B000; {fixed-width font}
- fxdFntH = $B001; { with height table}
- fxdFntW = $B002; { with width table}
- fxdFntHW = $B003; { with height & width tables}
-
- fontWid = $ACB0; {font width data: 64K ROM only}
-
- The low-order two bits of the fontType field tell whether the two optional tables are
- present. If bit 0 is set, there’s an image-height table; if bit 1 is set, there’s a
- character width table.
-
- The optional character-width table immediately follows the offset/width table; it’s a
- variable-length array specifying the fixed-point character widths for each character
- in the font. Each entry is a word in length. For compactness, a special 16-bit fixed-point
- format is used with an unsigned integer part in the high-order byte and a fractional
- part in the low-order byte.
-
- •••Refer to Technical Note #30:•••
-
- The optional image-height table, which speeds the drawing of characters, may also be
- appended after the character-width table; it’s a variable-length array specifying the
- image height of each character in the font. Each entry is a word in length; the
- high-order byte is the offset of the first non-white row in the character; the low-order
- byte is the number of rows that must be drawn. The image height is the height of the
- character image and is less than or equal to the font height; it’s used in conjunction
- with QuickDraw for improved character plotting. Most font resources don’t contain
- this table; it’s typically generated by the Font Manager when the font is swapped
- in.
-
- Note: The 64K ROM version of the Resource Manager limits the total space
- occupied by the bit image, location table, offset/width table, and
- character-width and image-height tables to 32K bytes. For this reason,
- the practical limit on the font size of a full font is about 40 points.
-
- Note: The extensions to the Font Manager described in the following paragraphs
- were originally documented in Inside Macintosh, Volume V. As such,
- this information refers to the Macintosh SE and Macintosh II ROMs and
- System file version 4.1 and later.
-
- Several previously unused bits of the fontType field specify the font depth and other
- related information (the new bits are marked by an asterisk):
-
- Bit Meaning
-
- 0 Set if there’s an image-height table
- 1 Set if there’s a character-width table
- * 2–3 Font depth (Macintosh II only—must be 0 otherwise)
- 4–6 Reserved (should be 0)
- * 7 Set if font has an 'fctb' resource (Macintosh II
- only—must be 0 otherwise)
- * 8 Set if a synthetic font (Macintosh II only—must be 0 otherwise)
- * 9 Set if font contains colors other than black (Macintosh II
- only—must be 0 otherwise)
- 10–11 Reserved (should be 0)
- 12 Reserved (should be 1)
- 13 Set for fixed-width font, clear for proportional font
- * 14 Set if font is not to be expanded (Macintosh II
- only—must be 0 otherwise)
- 15 Reserved (should be 1)
-
- Bit 2 and 3 specify the font depth and can contain the following values:
-
- Value Font depth
- 0 1-bit
- 1 2-bit
- 2 4-bit
- 3 8-bit
-
- The font depth is normally 0, indicating a font intended for a screen one bit deep.
- If bit 7 is set (and the font is an 'NFNT' resource), a resource of type 'fctb' with
- the same ID as the font can optionally be provided to assign RGB colors to specific
- pixel values.
-
- Bit 8 is used only by the Font Manager to indicate a synthetic font, created dynamically
- from the available font resources in response to a certain color and screen depth
- combination.
-
- Bit 9 is set if the font contains other than black.
-
- Setting bit 14 indicates that the font should not be expanded by the Font Manager to
- match the screen depth; some international fonts, such as kanji, are too large for
- synthetic fonts to be effective or meaningful.
-
- To accommodate multibit font depths, the owTLoc field has been changed to a long
- word, the nDescent field becoming the high-order word. (For backward compatibility,
- nDescent is ignored if it’s negative.)
-
- Note: The 128K ROM version of the Font Manager limits the strike for a
- 1-bit font to not quite 128K; this limits the largest practical
- font to about 127 points. The Macintosh II ROM limits the largest
- practical font to about 255 points, regardless of the font depth.
-
- »Font Color Tables
-
- Note: The extensions to the Font Manager described in the following paragraphs
- were originally documented in Inside Macintosh, Volume V. As such,
- this information refers to the Macintosh SE and Macintosh II ROMs and
- System file version 4.1 and later.
-
- With resources of type 'NFNT', you can specify absolute colors for the font by also
- supplying a color table. Stored as a resource of type 'fctb' with the same ID as the
- associated 'NFNT' resource, this table is simply the ColorTable record described in
- the Color Manager chapter.
-
- A 4-bit font depth provides index values for a color table containing 16 entries. If
- there are index values for which no corresponding entries are found in the associated
- color table, the Font Manager assigns colors based on the current port’s foreground
- and background colors. If only one entry is missing, it’s assigned the background
- color. If two entries are missing, the higher index value is assigned the foreground
- color and the lower value is given the background color. If more than two values are
- missing, the entries are given shades ranging between the foreground and background
- colors. Figure 19 shows a hypothetical color table for a 2-bit font in which only
- five entries have been supplied in the 'fctb' resource.
-
- •••Refer to Figure 19.•••
-
- Figure 19–Hypothetical Font Color Table Entries
-
- If no color table is provided, the highest and lowest possible index values for any
- given screen depth (with a 2-bit screen depth, for example, values 7 and 0) are
- assigned the foreground and background colors respectively, with the remaining entries
- given shades in between. This allows gray-scale fonts to be created with as many
- levels of gray as are needed (since each gray is just a color in between a foreground
- of black and a background of white) without needing a color table.
-
- æKY nrct
- æC /*----------------------------nrct • Rectangle List-------------------------------------*/
- type 'nrct' {
- integer = $$CountOf(RectArray); /* Number of rectangles */
- array RectArray {
- rect;
- };
- };
-
- æKY ROv#
- æC /*----------------------------ROv# • ROM Resource Override------------------------------*/
- type 'ROv#' {
- unsigned hex integer; /* Version # of ROM */
- integer = $$CountOf(typeList) - 1; /* Number of resources */
- wide array typeList {
- literal longint; /* Resource type */
- integer; /* Resource id */
- };
- };
-
- æKY scrn
- æC /*----------------------------scrn • Screen Configuration-------------------------------*/
- type 'scrn' {
- integer = $$CountOf(Device); /* Number of displays */
- wide array Device {
- unsigned hex integer; /* sRsrc Type */
- integer; /* Slot number */
- unsigned hex longint; /* dCtlDevBase */
- integer; /* sRsrcID for mode */
- integer = $77FE; /* Flag mask */
- Boolean inactive, active; /* Device active flag */
- fill bit[3]; /* reserved */
- Boolean auxillaryScreen, mainScreen; /* Main screen flag */
- unsigned bitstring[10] = 0; /* reserved */
- Boolean monochrome, color; /* Device type */
- integer; /* Rsrc ID of 'clut' */
- integer; /* Rsrc ID of 'gama' */
- Rect; /* Device's global rect */
- integer = $$CountOf(ControlCalls); /* # of control calls */
- wide array ControlCalls {
- integer; /* csCode for this call */
- wstring; /* param block data */
- align word;
-
- };
- };
- };
- _______________________________________________________________________________
-
- »GRAPHICS DEVICE RESOURCES
- _______________________________________________________________________________
-
- A new resource type has been added to describe the setup of graphics devices:
-
- 'scrn' Screen resource type
-
- The 'scrn' resource contains all the screen configuration information for a multiple
- screen system. Only the 'scrn' resource with ID = 0 is used by the system. Normally
- your application won’t have to alter or examine this resource. It’s created by the
- control panel, and is used by InitGraf.
-
- The 'scrn' resource consists of a sequence of records, each describing one screen
- device. In the following description this sequence of records is represented by a
- Pascal FOR loop that repeats once for each screen device.
-
- 'scrn' (Screen configuration)
-
- ScrnCount [word] number of devices in resource
- FOR i := 1 to ScrnCount DO
- spDrvrHw [word] Slot Manager hardware ID
- slot [word] slot number
- dCtlDevBase [long] dCtlDevBase from DCE
- mode [word] Slot Manager ID for screen’s mode
- flagMask [word] = $77FE
- flags [word] indicates device state
- bit 0 = 0 if monochrome; 1 if color
- bit 11 = 1 if device is main screen
- bit 15 = 1 if device is active
- colorTable [word] resource id of desired 'clut'
- gammaTable [word] resource id of desired 'gama'
- global Rect [rect] device’s global rectangle
- ctlCount [word] number of control calls
- FOR j := 1 to ctlCount DO
- csCode [word] control code for this call
- length [word] number of bytes in param block
- param blk [length] data to be passed in control call
- END;
- END;
-
- The records in the 'scrn' resource must be in the same order as cards in the slots
- (starting with the lowest slot). InitGraf scans through the video cards in the
- slots, and compares them with the descriptors in the 'scrn' resource. If the spDrvrHw,
- slot, and dCtlDevBase fields all match for every screen device in the system, the
- 'scrn' resource is used to initialize the video devices. Otherwise the 'scrn' resource
- is simply ignored. Thus if you move a video card, or add or remove one, the 'scrn'
- resource will become invalid.
-
- SpDrvrHw is a Slot Manager field that identifies the type of hardware on the card.
- (The spDrvrSw field on the card must identify it as an Apple-compatible video driver.)
- Slot is the number of the slot containing the card. DCtlDevBase is the beginning of
- the device’s address space, taken from the device’s DCE.
-
- If all video devices match, the rest of the information in the 'scrn' resource is
- used to configure the video devices. The mode is actually the slot manager ID
- designating the descriptor for that mode. This same mode number is passed to the
- video driver to tell it which mode to use.
-
- The flags bits are used to determine whether the device is active (that is, whether
- it will be used), whether it’s color or monochrome, and whether it’s the main screen
- (the one with the menu bar). The flagMask simply tells which bits in the flags word
- are used.
-
- To use the default color table for a device, set the colorTable field to –1. To use
- the default gamma table for a device, set the gammaTable field to –1.
- (Gamma correction is a technique used to select the appropriate intensities of the
- colors sent to a display device. The default gamma table is designed for the Macintosh
- II 13-inch color monitor; other manufacturers’ color monitors might incorporate their
- own gamma tables.)
-
- The global rect specifies the coordinates of the device relative to other devices.
- The main device must have topLeft = 0,0. The coordinates of all other devices are
- specified relative to this device. Devices may not overlap, and must share at least
- part of an edge with another device. To support future device capabilities, a series
- of control calls may be specified. These are issued to the driver in the given
- order.
-
- æKY snd
- æC /*----------------------------snd • Sound----------------------------------------------*/
- type 'snd ' {
- switch {
- case FormatOne:
- key unsigned integer = $0001;
- unsigned integer = $$CountOf(Synthesizers);
- wide array Synthesizers {
- /* Resource ID of synthesizer/modifer */
- integer generalNoteSynth = $0001, // For any Macintosh
- generalWaveTableSynth = $0003,
- generalSampledSynth = $0005,
-
- sndChipNoteSynth = $0801, // For Macintosh with
- sndChipWaveTableSynth = $0803, // Apple sound chip
- sndChipSampledSynth = $0805,
-
- plusAndSEnoteSynth = $1001, // For Macintosh Plus
- plusAndSEwaveTableSynth = $1003, // and SE
- plusAndSEsampledSynth = $1005;
- longint; /* init parameter */
- };
-
- case FormatTwo:
- key unsigned integer = $0002;
- integer free = 0, keepInMemory = 256+1; /* Space for refe count */
- };
- unsigned integer = $$CountOf(SoundCmnds);
- wide array SoundCmnds {
- boolean noData, hasData;
- switch {
- case nullCmd:
- key bitstring[15] = 0;
- fill word; /* Param 1 = nil */
- fill long; /* Param 2 = nil */
- case initCmd:
- key bitstring[15] = 1;
- fill word; /* Param 1 = nil */
- longint initChanLeft = $02, /* Init */
- initChanRight = $03,
- initChan0 = $04, initChan1 = $05,
- initChan2 = $06, initChan3 = $07,
- initSRate22k = $20, initSRate44k = $30,
- initMono = $80, initStereo = $C0;
- case freeCmd:
- key bitstring[15] = 2;
- fill word; /* Param 1 = nil */
- fill long; /* Param 2 = nil */
- case quietCmd:
- key bitstring[15] = 3;
- fill word; /* Param 1 = nil */
- fill long; /* Param 2 = nil */
- case flushCmd:
- key bitstring[15] = 4;
- fill word; /* Param 1 = nil */
- fill long; /* Param 2 = nil */
- case waitCmd:
- key bitstring[15] = 10;
- integer oneSecond = 2000; /* Duration */
- fill long; /* Param 2 = nil */
- case pauseCmd:
- key bitstring[15] = 11;
- fill word; /* Param 1 = nil */
- fill long; /* Param 2 = nil */
- case resumeCmd:
- key bitstring[15] = 12;
- fill word; /* Param 1 = nil */
- fill long; /* Param 2 = nil */
- case callBackCmd:
- key bitstring[15] = 13;
- integer; /* User-defined */
- longint; /* User-defined */
- case syncCmd:
- key bitstring[15] = 14;
- integer; /* Count */
- longint; /* Identifier */
- case emptyCmd:
- key bitstring[15] = 15;
- fill word; /* Param 1 = nil */
- fill long; /* Param 2 = nil */
- case tickleCmd:
- key bitstring[15] = 20;
- fill word; /* Param 1 = nil */
- fill long; /* Param 2 = nil */
- case requestNextCmd:
- key bitstring[15] = 21;
- integer; /* Count */
- fill long; /* Param 2 = nil */
- case howOftenCmd:
- key bitstring[15] = 22;
- integer; /* Period */
- longint; /* Ptr to modifier stub */
- case wakeUpCmd:
- key bitstring[15] = 23;
- integer; /* Period */
- longint; /* Ptr to modifier stub */
- case availableCmd:
- key bitstring[15] = 24;
- integer; /* Status */
- longint initChanLeft = $02, /* Init */
- initChanRight = $03,
- initChan0 = $04, initChan1 = $05,
- initChan2 = $06, initChan3 = $07,
- initSRate22k = $20, initSRate44k = $30,
- initMono = $80, initStereo = $C0;
- case versionCmd:
- key bitstring[15] = 25;
- fill word; /* Param 1 = nil */
- longint; /* Version returned */
- case noteCmd:
- key bitstring[15] = 40;
- integer oneSecond = 2000; /* Duration */
- longint; /* Amplitude + frequency*/
- case restCmd:
- key bitstring[15] = 41;
- integer oneSecond = 2000; /* Duration */
- fill long; /* Param 2 = nil */
- case freqCmd:
- key bitstring[15] = 42;
- fill word; /* Param 1 = nil */
- longint; /* Frequency */
- case ampCmd:
- key bitstring[15] = 43;
- integer; /* Amplitude */
- fill long; /* Param 2 */
- case timbreCmd:
- key bitstring[15] = 44;
- integer sineWave, squareWave = 255; /* Timbre */
- fill long; /* Param 2 */
- case waveTableCmd:
- key bitstring[15] = 60;
- unsigned integer; /* Length */
- longint; /* Pointer to table */
- case phaseCmd:
- key bitstring[15] = 61;
- integer; /* Shift */
- longint; /* chanPtr */
- case soundCmd:
- key bitstring[15] = 80;
- fill word; /* Param 1 = nil */
- longint; /* Pointer to sound */
- case bufferCmd:
- key bitstring[15] = 81;
- fill word; /* Param 1 = nil */
- longint; /* Pointer to buffer */
- case rateCmd:
- key bitstring[15] = 82;
- fill word; /* Param 1 = nil */
- longint; /* Rate */
- case contBufferCmd:
- key bitstring[15] = 83;
- fill word; /* Param 1 = nil */
- longint; /* Pointer */
- };
- };
- array DataTables {
- DataTable:
- fill long; /* Pointer to data */
- SampleCnt:
- unsigned longint; /* # of sound samples */
- unsigned hex longint
- Rate22K = $56ee8ba4; /* Sampling rate */
- unsigned longint; /* Start of loop */
- unsigned longint; /* End of loop */
- integer; /* baseNote */
- hex string [$$Long(SampleCnt[$$ArrayIndex(DataTables)])];
- };
- };
- _______________________________________________________________________________
-
- »SOUND RESOURCES
- _______________________________________________________________________________
-
- •••Refer to Figure 3.•••
-
- Figure 3–'snd ' Resource Layout
-
- Sound resources are intended to be simple, portable, and dynamic solutions for incorporating
- sounds into applications. Creating these 'snd ' or sound resources, requires some
- understanding of sound synthesis to build a sampled sound header, wave table data,
- and sound commands. There are two types of
- 'snd ' resources, format 1 and format 2. Figure 3 compares the structures of both of
- these formats. These resources should have their purgeable bit set or the application
- will need to call _HPurge after using the 'snd '.
-
- The format 1 'snd ' was developed for use with the Sound Manager. A format 1
- 'snd ' may be a sequence of commands describing a melody without specifying a synthesizer
- or modifier and without sound data. This would allow an application to use the
- _SndPlay routine on any channel to play that melody. A format 1 'snd ' resource may
- contain a sampled sound or wave table data.
-
- The format 2 'snd ' was developed for use with HyperCard. It is intended for use
- with the sampled sound synthesizer only. A format 2 simply contains a sound command
- that points to a sampled sound header.
-
- Warning: HyperCard (versions 1.2.1 and earlier) contain 'snd ' resources
- incorrectly labeled as format 1. Refer to Macintosh Technical
- Note #168.
-
- Note: Numbers for 'snd ' resources in the range 0 through 8191 are reserved
- for Apple. The 'snd ' resources numbered 1 through 4 are defined to be
- the standard system beep.
-
- A sound command contained in a 'snd ' resource with associated sound data is marked
- by setting the high bit of the command. This changes the param2 field of the command
- to be an offset value from the resource’s beginning, pointing to the location of the
- sound data. Refer to Figure 5 showing the structure of a sound command. To calculate
- this offset, use one of the following formulas below.
-
- For a format 1 'snd ' resource, the offset is calculated as follows:
-
- offset = 4 + (number of synth/mods * 6) + (number of cmds * 8)
-
- For a format 2 'snd ' resource, the offset is calculated as follows:
-
- offset = 6 + (number of cmds * 8)
-
- The first few bytes of the resource contain 'snd ' header information and are a
- different size for either format. Each synthesizer or modifier specified in a format
- 1 'snd ' requires 6 bytes. The number of synthesizers and/or modifiers multiplied by
- 6 is added to this offset. The number of commands multiplied by 8 bytes, the size of
- a sound command, is added to the offset.
-
- _______________________________________________________________________________
-
- »Format 1 'snd ' Resource
-
- Figure 3 shows the fields of a format 1 'snd ' resource. This resource may also
- contain the actual sound data for the wave table synthesizer or the sampled sound
- synthesizer. The number of synthesizer and modifiers to be used by this 'snd ' is
- specified in the field number of synth/modifiers. The synthesizer required to produce
- the sound described in the 'snd ' is specified by the field synth resource ID. If
- any modifiers are to be installed, their resource IDs follow the first synthesizer.
- Any synthesizer or modifier specified beyond this first one will be installed into
- the channel as a modifier.
-
- For every synthesizer and modifier, an init option can be supplied in the field
- immediately following the resource ID for each synthesizer or modifier. The number
- of commands within the resource is specified in the field number of sound commands.
- Each sound command follows in the order they should be sent to the channel. If a
- command such as a bufferCmd is contained in this resource, it needs to specify where
- in the resource the sampled sound header is located. This is done by setting the
- high bit of the bufferCmd and supplying the offset in param2. Refer to the section
- “Sound Manager Commands”.
-
- The 'snd ' resource may be only a sequence of commands describing a melody playable
- by any synthesizer. This allows the 'snd ' to be used on any channel. In this case
- the number of synth/modifiers should be 0, and there would not be a synth resource ID
- nor init option in the 'snd '.
-
- »Example Format 1 'snd '
-
- The following example resource contains the proper information to create a sound with
- _SndPlay and the sampled sound synthesizer.
-
- HEX Size Meaning
-
- {beginning of snd resource, header information}
- $0001 WORD format 1 resource
- $0001 WORD number of synth/modifiers to be installed
-
- {synth ID to be used}
- $0005 WORD resource ID of the first synth/modifier
- $0000 0000 LONG initialization option for first synth/modifier
-
- $0001 WORD number of sound commands to follow
-
- {first command, 8 bytes in length}
- $8051 WORD bufferCmd, high bit on to indicate sound data included
- $0000 WORD bufferCmd param1
- $0000 0014 LONG bufferCmd param2, offset to sound header (20 bytes)
-
- {sampled sound header used in a soundCmd and bufferCmd}
- $0000 0000 LONG pointer to data (it follows immediately}
- $0000 0BB8 LONG number of samples in bytes (3000 samples)
- $56EE 8BA3 LONG sampling rate of this sound (22kHz)
- $0000 07D0 LONG starting of the sample’s loop point
- $0000 0898 LONG ending of the sample’s loop point
- $00 BYTE standard sample encoding
- $3C BYTE baseNote (middle C) at which sample was taken
-
- {Packed Array [1..3000] OF Byte, the sampled sound data}
- $8080 8182 8487 9384 6F68 6D65 727B 8288
- $918E 8D8F 867E 7C79 6F6D 7170 7079 7F81
- $898F 8D8B...
-
- _______________________________________________________________________________
-
- »Format 2 'snd ' Resource
-
- The format 2 'snd ' resource is used by the sampled sound synthesizer only and must
- contain a sampled sound. The _SndPlay routine supports this format by automatically
- opening a channel to the sample sound synthesizer and using the bufferCmd.
-
- Figure 3 shows the fields of a format 2 'snd ' resource. The field reference count
- is for the application’s use and is not used by the Sound Manager. The fields number
- of sound commands and the sound commands are the same as described in a format 1
- resource. The last field of this 'snd ' is for the sampled sound. The first command
- should be either a soundCmd or bufferCmd with the pointer bit set in the command to
- specify the location of this sampled sound header. Any other sound commands in this
- 'snd ' will be ignored by the Sound Manager.
-
- »Example Format 2 'snd '
-
- The following example resource contains the proper information to create a sound with
- _SndPlay and the sampled sound synthesizer.
-
- HEX Size Meaning
-
- {beginning of 'snd ' resource, header information}
- $0002 WORD format 2 resource
- $0000 WORD reference count for application’s use
- $0001 WORD number of sound commands to follow
-
- {first command, 8 bytes in length}
- $8051 WORD bufferCmd, high bit on to indicate sound data included
- $0000 WORD bufferCmd param1
- $0000 0014 LONG bufferCmd param2, offset to sound header (20 bytes)
-
- {sampled sound header used in a soundCmd and bufferCmd}
- $0000 0000 LONG pointer to data (it follows immediately}
- $0000 0BB8 LONG number of samples in bytes (3000 samples)
- $56EE 8BA3 LONG sampling rate of this sound (22kHz)
- $0000 07D0 LONG starting of the sample’s loop point
- $0000 0898 LONG ending of the sample’s loop point
- $00 BYTE standard sample encoding
- $3C BYTE baseNote (middle C) at which sample was taken
-
- {Packed Array [1..3000] OF Byte, the sampled sound data}
- $8080 8182 8487 9384 6F68 6D65 727B 8288
- $918E 8D8F 867E 7C79 6F6D 7170 7079 7F81
- $898F 8D8B...
-
- æKY vers
- æC /*----------------------------vers • Version--------------------------------------------*/
- type 'vers' {
- hex byte; /* Major revision in BCD*/
- hex byte; /* Minor vevision in BCD*/
- hex byte development = 0x20, /* Release stage */
- alpha = 0x40,
- beta = 0x60,
- final = 0x80, /* or */ release = 0x80;
- hex byte; /* Non-final release # */
- integer Country; /* Country code */
- pstring; /* Short version number */
- pstring; /* Long version number */
- };
- æKY PICT
- æC /*----------------------------PICT • Quickdraw Picture----------------------------------*/
- type 'PICT' {
- unsigned integer; /* Length */
- rect; /* Frame */
- hex string; /* Data */
- };
- /*--------------------------------------------------------------------------------------*/
- type 'PICT' {
- startOfPict:
- unsigned integer = (endOfPict - startOfPict) >> 3;
- Rect; /* Bounds of picture */
- switch {
- case VersionOne:
- key integer = $1101;
- array OpCodes {
- switch {
- case NOP:
- key byte = $00;
-
- case clipRgn:
- key byte = $01;
- clipRgnStart: integer = (clipRgnEnd[$$ArrayIndex(OpCodes)] - clipRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(clipRgnStart[$$ArrayIndex(OpCodes)]) - 10];
- clipRgnEnd:
- case bkPat:
- key byte = $02;
- hex string [8];
-
- case txFont:
- key byte = $03;
- integer; /* font */
-
- case txFace:
- key byte = $04;
- unsigned hex byte; /* text face */
-
- case txMode:
- key byte = $05;
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic;
-
- case spExtra:
- key byte = $06;
- unsigned hex longint;
-
- case pnSize:
- key byte = $07;
- Point;
-
- case pnMode:
- key byte = $08;
- unsigned hex integer;
-
- case pnPat:
- key byte = $09;
- hex string [8];
-
- case thePat:
- key byte = $0A;
- hex string [8];
-
- case ovSize:
- key byte = $0B;
- Point;
-
- case origin:
- key byte = $0C;
- integer; /* dh */
- integer; /* dv */
-
- case txSize:
- key byte = $0D;
- integer;
-
- case fgColor:
- key byte = $0E;
- longint;
-
- case bkColor:
- key byte = $0F;
- longint;
-
- case txRatio:
- key byte = $10;
- Point; /* numer */
- Point; /* denom */
-
- case picVersion:
- key byte = $11;
- byte;
-
- case line:
- key byte = $20;
- Point; /* pnLoc */
- Point; /* newPt */
-
- case lineFrom:
- key byte = $21;
- Point; /* newPt */
-
- case shortLine:
- key byte = $22;
- Point; /* pnLoc */
- byte; /* dh */
- byte; /* dv */
-
- case shortLineFrom:
- key byte = $23;
- byte; /* dh */
- byte; /* dv */
-
- case longText:
- key byte = $28;
- Point; /* txLoc */
- pstring;
-
- case dhText:
- key byte = $29;
- byte; /* dh */
- pstring;
-
- case dvText:
- key byte = $2A;
- byte; /* dvh */
- pstring;
-
- case dhdvText:
- key byte = $2B;
- byte; /* dh */
- byte; /* dv */
- pstring;
-
- case frameRect:
- key byte = $30;
- Rect;
-
- case paintRect:
- key byte = $31;
- Rect;
-
- case eraseRect:
- key byte = $32;
- Rect;
-
- case invertRect:
- key byte = $33;
- Rect;
-
- case fillRect:
- key byte = $34;
- Rect;
-
- case frameSameRect:
- key byte = $38;
-
- case paintSameRect:
- key byte = $39;
-
- case eraseSameRect:
- key byte = $3A;
-
- case invertSameRect:
- key byte = $3B;
-
- case fillSameRect:
- key byte = $3C;
-
- case frameRRect:
- key byte = $40;
- Rect;
-
- case paintRRect:
- key byte = $41;
- Rect;
-
- case eraseRRect:
- key byte = $42;
- Rect;
-
- case invertRRect:
- key byte = $43;
- Rect;
-
- case fillRRect:
- key byte = $44;
- Rect;
-
- case frameSameRRect:
- key byte = $48;
-
- case paintSameRRect:
- key byte = $49;
-
- case eraseSameRRect:
- key byte = $4A;
-
- case invertSameRRect:
- key byte = $4B;
-
- case fillSameRRect:
- key byte = $4C;
-
- case frameOval:
- key byte = $50;
- Rect;
-
- case paintOval:
- key byte = $51;
- Rect;
-
- case eraseOval:
- key byte = $52;
- Rect;
-
- case invertOval:
- key byte = $53;
- Rect;
-
- case fillOval:
- key byte = $54;
- Rect;
-
- case frameSameOval:
- key byte = $58;
-
- case paintSameOval:
- key byte = $59;
-
- case eraseSameOval:
- key byte = $5A;
-
- case invertSameOval:
- key byte = $5B;
-
- case fillSameOval:
- key byte = $5C;
-
- case frameArc:
- key byte = $60;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case paintArc:
- key byte = $61;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case eraseArc:
- key byte = $62;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case invertArc:
- key byte = $63;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case fillArc:
- key byte = $64;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case frameSameArc:
- key byte = $68;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case paintSameArc:
- key byte = $69;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case eraseSameArc:
- key byte = $6A;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case invertSameArc:
- key byte = $6B;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case fillSameArc:
- key byte = $6C;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case framePoly:
- key byte = $70;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case paintPoly:
- key byte = $71;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case erasePoly:
- key byte = $72;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case invertPoly:
- key byte = $73;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case fillPoly:
- key byte = $74;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case frameSamePoly:
- key byte = $78;
-
- case paintSamePoly:
- key byte = $79;
-
- case eraseSamePoly:
- key byte = $7A;
-
- case invertSamePoly:
- key byte = $7B;
-
- case fillSamePoly:
- key byte = $7C;
-
- case frameRgn:
- key byte = $80;
- frameRgnStart: integer = (frameRgnEnd[$$ArrayIndex(OpCodes)] - frameRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(frameRgnStart[$$ArrayIndex(OpCodes)]) - 10];
- frameRgnEnd:
- case paintRgn:
- key byte = $81;
- paintRgnStart: integer = (paintRgnEnd[$$ArrayIndex(OpCodes)] - paintRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(paintRgnStart[$$ArrayIndex(OpCodes)]) - 10];
- paintRgnEnd:
- case eraseRgn:
- key byte = $82;
- eraseRgnStart: integer = (eraseRgnEnd[$$ArrayIndex(OpCodes)] - eraseRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(eraseRgnStart[$$ArrayIndex(OpCodes)]) - 10];
- eraseRgnEnd:
- case invertRgn:
- key byte = $83;
- invertRgnStart: integer = (invertRgnEnd[$$ArrayIndex(OpCodes)] - invertRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(invertRgnStart[$$ArrayIndex(OpCodes)]) - 10];
- invertRgnEnd:
- case fillRgn:
- key byte = $84;
- fillRgnStart: integer = (fillRgnEnd[$$ArrayIndex(OpCodes)] - fillRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(fillRgnStart[$$ArrayIndex(OpCodes)]) - 10];
- fillRgnEnd:
- case frameSameRgn:
- key byte = $88;
-
- case paintSameRgn:
- key byte = $89;
-
- case eraseSameRgn:
- key byte = $8A;
-
- case invertSameRgn:
- key byte = $8B;
-
- case fillSameRgn:
- key byte = $8C;
-
- case bitsRect:
- key byte = $90;
- BitsRectRowBytes: integer; /* row bytes */
- BitsRectBounds: Rect; /* bounds */
- Rect; /* srcRect */
- Rect; /* destRect */
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic;
- hex string [($$BitField(BitsRectBounds[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(BitsRectBounds[$$ArrayIndex(OpCodes)],0,16))
- * $$Word(BitsRectRowBytes[$$ArrayIndex(OpCodes)])];
-
- case bitsRgn:
- key byte = $91;
- BitsRgnRowBytes: integer; /* row bytes */
- BitsRgnBounds: Rect; /* bounds */
- Rect; /* srcRect */
- Rect; /* destRect */
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic;
- bitsRgnStart: integer = (bitsRgnEnd[$$ArrayIndex(OpCodes)] - bitsRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(bitsRgnStart[$$ArrayIndex(OpCodes)]) - 10];
- bitsRgnEnd:
- hex string [($$BitField(BitsRgnBounds[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(BitsRgnBounds[$$ArrayIndex(OpCodes)],0,16))
- * $$Word(BitsRgnRowBytes[$$ArrayIndex(OpCodes)])];
-
- case packBitsRect:
- key byte = $98;
- PackBitsRectRowBytes: integer; /* row bytes */
- PackBitsRectBounds: Rect; /* bounds */
- Rect; /* srcRect */
- Rect; /* destRect */
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic;
- PackBitsBits: hex string [$$PackedSize(PackBitsBits[$$ArrayIndex(OpCodes)],
- $$Word(PackBitsRectRowBytes[$$ArrayIndex(OpCodes)]),
- ($$BitField(PackBitsRectBounds[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(PackBitsRectBounds[$$ArrayIndex(OpCodes)],0,16)))];
-
- case packBitsRgn:
- key byte = $99;
- packBitsRgnRowBytes: integer; /* row bytes */
- packBitsRgnBounds: Rect; /* bounds */
- Rect; /* srcRect */
- Rect; /* destRect */
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic;
- packBitsRgnStart: integer = (packBitsRgnEnd[$$ArrayIndex(OpCodes)] - packBitsRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(packBitsRgnStart[$$ArrayIndex(OpCodes)]) - 10];
- packBitsRgnEnd: hex string [$$PackedSize(packBitsRgnEnd[$$ArrayIndex(OpCodes)],
- $$Word(packBitsRgnRowBytes[$$ArrayIndex(OpCodes)]),
- ($$BitField(packBitsRgnBounds[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(packBitsRgnBounds[$$ArrayIndex(OpCodes)],0,16)))];
-
- case shortComment:
- key byte = $A0;
- integer; /* kind */
-
- case longComment:
- key byte = $A1;
- integer; /* kind */
- longCommentStart: integer = (longCommentEnd[$$ArrayIndex(OpCodes)] - longCommentStart[$$ArrayIndex(OpCodes)] - 16) >> 3;
- hex string [$$Word(longCommentStart[$$ArrayIndex(OpCodes)])];
- longCommentEnd:
- };
- };
- byte = $FF; /* End of picture */
-
- case VersionTwo:
- key longint = $001102ff; /* Version op + version */
- array OpCodes {
- switch {
- case Clip:
- key integer = $0001;
- ClipStart: integer = (ClipEnd[$$ArrayIndex(OpCodes)] - ClipStart[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(ClipStart[$$ArrayIndex(OpCodes)]) - 10];
- ClipEnd:
- case BkPat:
- key integer = $0002;
- hex string [8];
-
- case TxFont:
- key integer = $0003;
- integer; /* font */
-
- case TxFace:
- key integer = $0004;
- unsigned hex byte; /* text face */
-
- case TxMode:
- key integer = $0005;
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic;
-
- case SpExtra:
- key integer = $0006;
- unsigned hex longint;
-
- case PnSize:
- key integer = $0007;
- Point;
-
- case PnMode:
- key integer = $0008;
- unsigned hex integer;
-
- case PnPat:
- key integer = $0009;
- hex string [8];
-
- case FillPat:
- key integer = $000A;
- hex string [8];
-
- case OvSize:
- key integer = $000B;
- Point;
-
- case Origin:
- key integer = $000C;
- integer; /* dh */
- integer; /* dv */
-
- case TxSize:
- key integer = $000D;
- integer;
-
- case FgColor:
- key integer = $000E;
- longint;
-
- case BkColor:
- key integer = $000F;
- longint;
-
- case TxRatio:
- key integer = $0010;
- Point; /* numer */
- Point; /* denom */
-
- case Version:
- key integer = $0011;
- byte;
-
- case BkPixPat:
- key integer = $0012;
- switch {
- case newPattern:
- key integer = 1;
- hex string [8]; /* old-style pattern */
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- BkPixPatpMapRowBytes: unsigned bitstring[13]; /* Offset to next row */
- BkPixPatBounds: rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint; /* Offset to color table*/
- fill long; /* Reserved */
- /* Color Table */
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- /* If rowBytes < 8 then data is unpacked,
- if >= 8, then data is packed */
- BkPixPatBits: hex string [($$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
- $$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
- ($$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
- $$PackedSize(BkPixPatBits[$$ArrayIndex(OpCodes)],
- $$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
- ($$BitField(BkPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(BkPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
-
- case ditherPattern:
- key integer = 2;
- hex string [8]; /* old-style pattern */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
-
- case PnPixPat:
- key integer = $0013;
- switch {
- case newPattern:
- key integer = 1;
- hex string [8]; /* old-style pattern */
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- PnPixPatpMapRowBytes: unsigned bitstring[13]; /* Offset to next row */
- PnPixPatBounds: rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint; /* Offset to color table*/
- fill long; /* Reserved */
- /* Color Table */
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- /* If rowBytes < 8 then data is unpacked,
- if >= 8, then data is packed */
- PnPixPatBits: hex string [($$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
- $$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
- ($$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
- $$PackedSize(PnPixPatBits[$$ArrayIndex(OpCodes)],
- $$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
- ($$BitField(PnPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(PnPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
-
- case ditherPattern:
- key integer = 2;
- hex string [8]; /* old-style pattern */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
-
- case FillPixPat:
- key integer = $0014;
- switch {
- case newPattern:
- key integer = 1;
- hex string [8]; /* old-style pattern */
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- FillPixPatpMapRowBytes: unsigned bitstring[13]; /* Offset to next row */
- FillPixPatBounds: rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint; /* Offset to color table*/
- fill long; /* Reserved */
- /* Color Table */
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- /* If rowBytes < 8 then data is unpacked,
- if >= 8, then data is packed */
- FillPixPatBits: hex string [($$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
- $$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
- ($$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
- $$PackedSize(FillPixPatBits[$$ArrayIndex(OpCodes)],
- $$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
- ($$BitField(FillPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(FillPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
-
- case ditherPattern:
- key integer = 2;
- hex string [8]; /* old-style pattern */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
-
- case PnLocHFrac:
- key integer = $0015;
- unsigned hex integer;
-
- case ChExtra:
- key integer = $0016;
- integer; /* extra for each character */
-
- case AppleReserved0017:
- key integer = $0017;
-
- case AppleReserved0018:
- key integer = $0018;
-
- case AppleReserved0019:
- key integer = $0019;
-
- case RGBFgCol:
- key integer = $001A;
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
-
- case RGBBkCol:
- key integer = $001B;
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
-
- case HiliteMode:
- key integer = $001C;
-
- case HiliteColor:
- key integer = $001D;
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
-
- case DefHilite:
- key integer = $001E;
-
- case OpColor:
- key integer = $001F;
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
-
- case Line:
- key integer = $0020;
- Point; /* pnLoc */
- Point; /* newPt */
-
- case LineFrom:
- key integer = $0021;
- Point; /* newPt */
-
- case ShortLine:
- key integer = $0022;
- Point; /* pnLoc */
- byte; /* dh */
- byte; /* dv */
-
- case ShortLineFrom:
- key integer = $0023;
- byte; /* dh */
- byte; /* dv */
-
- case AppleReserved0024:
- key integer = $0024;
- AR24: unsigned integer = (AR24End - AR24) / 8 - 2;
- hex string [$$Word(AR24)];
- AR24End:
-
- case AppleReserved0025:
- key integer = $0025;
- AR25: unsigned integer = (AR25End - AR25) / 8 - 2;
- hex string [$$Word(AR25)];
- AR25End:
-
- case AppleReserved0026:
- key integer = $0026;
- AR26: unsigned integer = (AR26End - AR26) / 8 - 2;
- hex string [$$Word(AR26)];
- AR26End:
-
- case AppleReserved0027:
- key integer = $0027;
- AR27: unsigned integer = (AR27End - AR27) / 8 - 2;
- hex string [$$Word(AR27)];
- AR27End:
-
- case LongText:
- key integer = $0028;
- Point; /* txLoc */
- pstring; /* text */
-
- case DHText:
- key integer = $0029;
- byte; /* dh */
- pstring; /* text */
-
- case DVText:
- key integer = $002A;
- byte; /* dv */
- pstring; /* text */
-
- case DHDVText:
- key integer = $002A;
- byte; /* dh */
- byte; /* dv */
- pstring; /* text */
-
- case AppleReserved002C:
- key integer = $002C;
- AR2C: unsigned integer = (AR2CEnd - AR2C) / 8 - 2;
- hex string [$$Word(AR2C)];
- AR2CEnd:
-
- case AppleReserved002D:
- key integer = $002D;
- AR2D: unsigned integer = (AR2DEnd - AR2D) / 8 - 2;
- hex string [$$Word(AR2D)];
- AR2DEnd:
-
- case AppleReserved002E:
- key integer = $002E;
- AR2E: unsigned integer = (AR2EEnd - AR2E) / 8 - 2;
- hex string [$$Word(AR2E)];
- AR2EEnd:
-
- case AppleReserved002F:
- key integer = $002F;
- AR2F: unsigned integer = (AR2FEnd - AR2F) / 8 - 2;
- hex string [$$Word(AR2F)];
- AR2FEnd:
-
- case FrameRect:
- key integer = $0030;
- Rect;
-
- case PaintRect:
- key integer = $0031;
- Rect;
-
- case EraseRect:
- key integer = $0032;
- Rect;
-
- case InvertRect:
- key integer = $0033;
- Rect;
-
- case FillRect:
- key integer = $0034;
- Rect;
-
- case AppleReserved0035:
- key integer = $0035;
- Rect;
-
- case AppleReserved0036:
- key integer = $0036;
- Rect;
-
- case AppleReserved0037:
- key integer = $0037;
- Rect;
-
- case FrameSameRect:
- key integer = $0038;
-
- case PaintSameRect:
- key integer = $0039;
-
- case EraseSameRect:
- key integer = $003A;
-
- case InvertSameRect:
- key integer = $003B;
-
- case FillSameRect:
- key integer = $003C;
-
- case AppleReserved003D:
- key integer = $003D;
-
- case AppleReserved003E:
- key integer = $003E;
-
- case AppleReserved003F:
- key integer = $003F;
-
- case FrameRRect:
- key integer = $0040;
- Rect;
-
- case PaintRRect:
- key integer = $0041;
- Rect;
-
- case EraseRRect:
- key integer = $0042;
- Rect;
-
- case InvertRRect:
- key integer = $0043;
- Rect;
-
- case FillRRect:
- key integer = $0044;
- Rect;
-
- case AppleReserved0045:
- key integer = $0045;
- Rect;
-
- case AppleReserved0046:
- key integer = $0046;
- Rect;
-
- case AppleReserved0047:
- key integer = $0047;
- Rect;
-
- case FrameSameRRect:
- key integer = $0048;
-
- case PaintSameRRect:
- key integer = $0049;
-
- case EraseSameRRect:
- key integer = $004A;
-
- case InvertSameRRect:
- key integer = $004B;
-
- case FillSameRRect:
- key integer = $004C;
-
- case AppleReserved004D:
- key integer = $004D;
-
- case AppleReserved004E:
- key integer = $004E;
-
- case AppleReserved004F:
- key integer = $004F;
-
- case FrameOval:
- key integer = $0050;
- Rect;
-
- case PaintOval:
- key integer = $0051;
- Rect;
-
- case EraseOval:
- key integer = $0052;
- Rect;
-
- case InvertOval:
- key integer = $0053;
- Rect;
-
- case FillOval:
- key integer = $0054;
- Rect;
-
- case AppleReserved0055:
- key integer = $0055;
- Rect;
-
- case AppleReserved0056:
- key integer = $0056;
- Rect;
-
- case AppleReserved0057:
- key integer = $0057;
- Rect;
-
- case FrameSameOval:
- key integer = $0058;
-
- case PaintSameOval:
- key integer = $0059;
-
- case EraseSameOval:
- key integer = $005A;
-
- case InvertSameOval:
- key integer = $005B;
-
- case FillSameOval:
- key integer = $005C;
-
- case AppleReserved005D:
- key integer = $005D;
-
- case AppleReserved005E:
- key integer = $005E;
-
- case frameArc:
- key integer = $0060;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case paintArc:
- key integer = $0061;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case eraseArc:
- key integer = $0062;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case invertArc:
- key integer = $0063;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case fillArc:
- key integer = $0064;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case AppleReserved0065:
- key integer = $0065;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case AppleReserved0066:
- key integer = $0066;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case AppleReserved0067:
- key integer = $0067;
- Rect;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case frameSameArc:
- key integer = $0068;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case paintSameArc:
- key integer = $0069;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case eraseSameArc:
- key integer = $006A;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case invertSameArc:
- key integer = $006B;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case fillSameArc:
- key integer = $006C;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case AppleReserved006D:
- key integer = $006D;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case AppleReserved006E:
- key integer = $006E;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case AppleReserved006F:
- key integer = $006F;
- integer; /* startAngle */
- integer; /* arcAngle */
-
- case framePoly:
- key integer = $0070;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case paintPoly:
- key integer = $0071;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case erasePoly:
- key integer = $0072;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case invertPoly:
- key integer = $0073;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case fillPoly:
- key integer = $0074;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case AppleReserved0075:
- key integer = $0075;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case AppleReserved0076:
- key integer = $0076;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case AppleReserved0077:
- key integer = $0077;
- integer = $$CountOf(framePoly) * 4 + 10;
- Rect; /* enclosing rectangle */
- array framePoly {
- Point;
- };
-
- case frameSamePoly:
- key integer = $0078;
-
- case paintSamePoly:
- key integer = $0079;
-
- case eraseSamePoly:
- key integer = $007A;
-
- case invertSamePoly:
- key integer = $007B;
-
- case fillSamePoly:
- key integer = $007C;
-
- case AppleReserved007D:
- key integer = $007D;
-
- case AppleReserved007E:
- key integer = $007E;
-
- case AppleReserved007F:
- key integer = $007F;
-
- case frameRgn:
- key integer = $0080;
- frameRgnStart2: integer = (frameRgnEnd2[$$ArrayIndex(OpCodes)] - frameRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(frameRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
- frameRgnEnd2:
- case paintRgn:
- key integer = $0081;
- paintRgnStart2: integer = (paintRgnEnd2[$$ArrayIndex(OpCodes)] - paintRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(paintRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
- paintRgnEnd2:
- case eraseRgn:
- key integer = $0082;
- eraseRgnStart2: integer = (eraseRgnEnd2[$$ArrayIndex(OpCodes)] - eraseRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(eraseRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
- eraseRgnEnd2:
- case invertRgn:
- key integer = $0083;
- invertRgnStart2: integer = (invertRgnEnd2[$$ArrayIndex(OpCodes)] - invertRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(invertRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
- invertRgnEnd2:
- case fillRgn:
- key integer = $0084;
- fillRgnStart2: integer = (fillRgnEnd2[$$ArrayIndex(OpCodes)] - fillRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(fillRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
- fillRgnEnd2:
- case AppleReserved0085:
- key integer = $0085;
- AppleReserved0085Start:integer = (AppleReserved0085End[$$ArrayIndex(OpCodes)] - AppleReserved0085Start[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(AppleReserved0085Start[$$ArrayIndex(OpCodes)]) - 10];
- AppleReserved0085End:
- case AppleReserved0086:
- key integer = $0086;
- AppleReserved0086Start: integer = (AppleReserved0086End[$$ArrayIndex(OpCodes)] - AppleReserved0086Start[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(AppleReserved0086Start[$$ArrayIndex(OpCodes)]) - 10];
- AppleReserved0086End:
- case AppleReserved0087:
- key integer = $0087;
- AppleReserved0087Start: integer = (AppleReserved0087End[$$ArrayIndex(OpCodes)] - AppleReserved0087Start[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(AppleReserved0087Start[$$ArrayIndex(OpCodes)]) - 10];
- AppleReserved0087End:
- case frameSameRgn:
- key integer = $0088;
-
- case paintSameRgn:
- key integer = $0089;
-
- case eraseSameRgn:
- key integer = $008A;
-
- case invertSameRgn:
- key integer = $008B;
-
- case fillSameRgn:
- key integer = $008C;
-
- case AppleReserved008D:
- key integer = $008D;
-
- case AppleReserved008E:
- key integer = $008E;
-
- case AppleReserved008F:
- key integer = $008F;
-
- case BitsRect:
- key integer = $0090;
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- BitsRectpMapRowBytes: unsigned bitstring[13]; /* Offset to next row */
- BitsRectBounds2: rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint; /* Offset to color table*/
- fill long; /* Reserved */
- /* Color Table */
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- Rect; /* srcRect */
- Rect; /* destRect */
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic,
- blend = 32, addPin, addOver, subPin,
- adMax = 37, subOver, adMin;
- BitsRectBits: hex string [$$BitField(BitsRectpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) *
- ($$BitField(BitsRectBounds2[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(BitsRectBounds2[$$ArrayIndex(OpCodes)],0,16))];
-
-
- case BitsRgn:
- key integer = $0091;
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- BitsRgnpMapRowBytes: unsigned bitstring[13]; /* Offset to next row */
- BitsRgnBounds2: rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint; /* Offset to color table*/
- fill long; /* Reserved */
- /* Color Table */
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- Rect; /* srcRect */
- Rect; /* destRect */
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic,
- blend = 32, addPin, addOver, subPin,
- adMax = 37, subOver, adMin;
- BitsRgnStart2: integer = (BitsRgnEnd2[$$ArrayIndex(OpCodes)] - BitsRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(BitsRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
- BitsRgnEnd2: hex string [$$PackedSize(BitsRgnEnd2[$$ArrayIndex(OpCodes)],
- $$BitField(BitsRgnpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
- ($$BitField(BitsRgnBounds2[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(BitsRgnBounds2[$$ArrayIndex(OpCodes)],0,16)))];
-
- case AppleReserved0092:
- key integer = $0092;
- AppleReserved0092Start: unsigned integer = (AppleReserved0092End[$$ArrayIndex(OpCodes)] - AppleReserved0092Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved0092Start[$$ArrayIndex(OpCodes)])];
- AppleReserved0092End:
- case AppleReserved0093:
- key integer = $0093;
- AppleReserved0093Start: unsigned integer = (AppleReserved0093End[$$ArrayIndex(OpCodes)] - AppleReserved0093Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved0093Start[$$ArrayIndex(OpCodes)])];
- AppleReserved0093End:
- case AppleReserved0094:
- key integer = $0094;
- AppleReserved0094Start: unsigned integer = (AppleReserved0094End[$$ArrayIndex(OpCodes)] - AppleReserved0094Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved0094Start[$$ArrayIndex(OpCodes)])];
- AppleReserved0094End:
- case AppleReserved0095:
- key integer = $0095;
- AppleReserved0095Start: unsigned integer = (AppleReserved0095End[$$ArrayIndex(OpCodes)] - AppleReserved0095Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved0095Start[$$ArrayIndex(OpCodes)])];
- AppleReserved0095End:
- case AppleReserved0096:
- key integer = $0096;
- AppleReserved0096Start: unsigned integer = (AppleReserved0096End[$$ArrayIndex(OpCodes)] - AppleReserved0096Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved0096Start[$$ArrayIndex(OpCodes)])];
- AppleReserved0096End:
- case AppleReserved0097:
- key integer = $0097;
- AppleReserved0097Start: unsigned integer = (AppleReserved0097End[$$ArrayIndex(OpCodes)] - AppleReserved0097Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved0097Start[$$ArrayIndex(OpCodes)])];
- AppleReserved0097End:
- case PackBitsRect:
- key integer = $0098;
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- PackBitsRectpMapRowBytes:unsigned bitstring[13]; /* Offset to next row */
- PackBitsRectBounds2: rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint; /* Offset to color table*/
- fill long; /* Reserved */
- /* Color Table */
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- Rect; /* srcRect */
- Rect; /* destRect */
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic,
- blend = 32, addPin, addOver, subPin,
- adMax = 37, subOver, adMin;
- PackBitsRectBits: hex string [$$PackedSize(PackBitsRectBits[$$ArrayIndex(OpCodes)],
- $$BitField(PackBitsRectpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
- ($$BitField(PackBitsRectBounds2[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(PackBitsRectBounds2[$$ArrayIndex(OpCodes)],0,16)))];
-
- case PackBitsRgn:
- key integer = $0099;
- unsigned bitstring[1] = 1; /* New pixMap flag */
- unsigned bitstring[2] = 0; /* Must be 0 */
- PackBitsRgnpMapRowBytes:unsigned bitstring[13]; /* Offset to next row */
- PackBitsRgnBounds2: rect; /* Bitmap bounds */
- integer; /* pixMap vers number */
- integer unpacked; /* Packing format */
- unsigned longint; /* Size of pixel data */
- unsigned hex longint; /* h. resolution (ppi) (fixed) */
- unsigned hex longint; /* v. resolution (ppi) (fixed) */
- integer chunky, chunkyPlanar, planar; /* Pixel storage format */
- integer; /* # bits in pixel */
- integer; /* # components in pixel*/
- integer; /* # bits per field */
- unsigned longint; /* Offset to next plane */
- unsigned longint; /* Offset to color table*/
- fill long; /* Reserved */
- /* Color Table */
- unsigned hex longint; /* ctSeed */
- integer; /* ctFlags */
- integer = $$Countof(ColorSpec) - 1; /* ctSize */
- wide array ColorSpec {
- integer; /* value */
- unsigned integer; /* RGB: red */
- unsigned integer; /* green */
- unsigned integer; /* blue */
- };
- Rect; /* srcRect */
- Rect; /* destRect */
- integer srcCopy, srcOr, srcXor, srcBic, /* mode */
- notSrcCopy, notSrcOr, notSrcXor,
- notSrcBic, patCopy, patOr, patXor,
- patBic, notPatCopy, notPatOr, notPatBic,
- blend = 32, addPin, addOver, subPin,
- adMax = 37, subOver, adMin;
- packBitsRgnStart2: integer = (packBitsRgnEnd2[$$ArrayIndex(OpCodes)] - packBitsRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
- Rect; /* region's enclosing rect */
- hex string [$$Word(packBitsRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
- packBitsRgnEnd2: hex string [$$PackedSize(packBitsRgnEnd2[$$ArrayIndex(OpCodes)],
- $$BitField(PackBitsRgnpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
- ($$BitField(PackBitsRgnBounds2[$$ArrayIndex(OpCodes)],32,16)
- - $$BitField(PackBitsRgnBounds2[$$ArrayIndex(OpCodes)],0,16)))];
-
- case AppleReserved009A:
- key integer = $009A;
- AppleReserved009AStart: unsigned integer = (AppleReserved009AEnd[$$ArrayIndex(OpCodes)] - AppleReserved009AStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved009AStart[$$ArrayIndex(OpCodes)])];
- AppleReserved009AEnd:
- case AppleReserved009B:
- key integer = $009B;
- AppleReserved009BStart: unsigned integer = (AppleReserved009BEnd[$$ArrayIndex(OpCodes)] - AppleReserved009BStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved009BStart[$$ArrayIndex(OpCodes)])];
- AppleReserved009BEnd:
- case AppleReserved009C:
- key integer = $009C;
- AppleReserved009CStart: unsigned integer = (AppleReserved009CEnd[$$ArrayIndex(OpCodes)] - AppleReserved009CStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved009CStart[$$ArrayIndex(OpCodes)])];
- AppleReserved009CEnd:
- case AppleReserved009D:
- key integer = $009D;
- AppleReserved009DStart: unsigned integer = (AppleReserved009DEnd[$$ArrayIndex(OpCodes)] - AppleReserved009DStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved009DStart[$$ArrayIndex(OpCodes)])];
- AppleReserved009DEnd:
- case AppleReserved009E:
- key integer = $009E;
- AppleReserved009EStart: unsigned integer = (AppleReserved009EEnd[$$ArrayIndex(OpCodes)] - AppleReserved009EStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved009EStart[$$ArrayIndex(OpCodes)])];
- AppleReserved009EEnd:
- case AppleReserved009F:
- key integer = $009F;
- AppleReserved009FStart: unsigned integer = (AppleReserved009FEnd[$$ArrayIndex(OpCodes)] - AppleReserved009FStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
- hex string [$$Word(AppleReserved009FStart[$$ArrayIndex(OpCodes)])];
- AppleReserved009FEnd:
- case ShortComment:
- key integer = $00A0;
- integer; /* comment kind */
-
- case LongComment:
- key integer = $00A1;
- integer; /* comment kind */
- longCommentStart2: integer = (longCommentEnd2[$$ArrayIndex(OpCodes)] - longCommentStart2[$$ArrayIndex(OpCodes)] - 16) >> 3;
- hex string [$$Word(longCommentStart2[$$ArrayIndex(OpCodes)])];
- longCommentEnd2:
- case OpEndPic:
- key integer = $00FF;
-
- case HeaderOp:
- key integer = $0C00;
- longint Version2 = -1;
- /* Fixed point bounding box */
- unsigned hex longint;
- unsigned hex longint;
- unsigned hex longint;
- unsigned hex longint;
- longint Version2 = -1; /* Reserved */
-
- };
- align word;
- };
- };
- endOfPict:
- };
-
- æKY DRVW
- æC /*
- * Macintosh Programmer's Workshop
- * DRVR resource type 'DRVR' (requires DRVRRuntime.o)
- */
-
- # define mDownMask 2 /* Event mask values for drvrEMask */
- # define mUpMask 4
- # define keyDownMask 8
- # define keyUpMask 16
- # define autoKeyMask 32
- # define updateMask 64
- # define diskMask 128
- # define activMask 256
- # define networkMask 1024
- # define driverMask 2048
- # define everyEvent -1
-
- /*
- * When building a DRVR resource, insert the line:
- *
- * type 'DRVR' as 'DRVW';
- *
- * in your resource file before your "resource 'DRVR' ..." declaration.
- */
-
- type 'DRVW' {
- boolean = 0; /* unused */
- boolean dontNeedLock, needLock; /* lock drvr in memory */
- boolean dontNeedTime, needTime; /* for periodic action */
- boolean dontNeedGoodbye, needGoodbye; /* call before heap reinit*/
- boolean noStatusEnable, statusEnable; /* responds to status */
- boolean noCtlEnable, ctlEnable; /* responds to control */
- boolean noWriteEnable, writeEnable; /* responds to write */
- boolean noReadEnable, readEnable; /* responds to read */
-
- byte = 0; /* low byte of drvrFlags word unused */
-
- unsigned integer; /* driver delay (ticks) */
- integer; /* desk acc event mask */
- integer; /* driver menu ID */
-
- unsigned integer = 50; /* offset to DRVRRuntime open */
- unsigned integer = 54; /* offset to DRVRRuntime prime */
- unsigned integer = 58; /* offset to DRVRRuntime control*/
- unsigned integer = 62; /* offset to DRVRRuntime status */
- unsigned integer = 66; /* offset to DRVRRuntime close */
-
- pstring[31]; /* driver name */
-
- hex string; /* driver code (use $$resource(...)) */
- };
- æKY cmdo
- æC
- type 'cmdo' {
- integer = CMDOVersion; /* Version number */
- integer = $$CountOf(dialogs); /* # of dialogs, at least 1 */
- array dialogs {
- integer; /* height of the dialog */
- cstring; /* text displayed in help window */
- align word;
-
- integer = $$CountOf(itemArray); /* # of items */
-
- /* The order in which Commando writes out the options is the same order in which the
- items in this array are entered in your resource declaration. This is important
- for those commands which have position dependent parameters. */
-
- wide array itemArray {
- switch {
- case NotDependent:
- key int = 0;
-
- case Or:
- key byte = 1;
- byte = $$CountOf(OrArray);
- wide array OrArray {
- int; /* item number dependent upon */
- };
-
- case And:
- key byte = 2;
- byte = $$CountOf(AndArray);
- wide array AndArray {
- int; /* item number dependent upon */
- };
- };
- switch {
- case Files:
- key byte = FilesID;
- byte InputFile, /* These types require the */
- InputFileOrDir, /* 'Additional' case below. */
- InputOrOutputFile,
- InputOrOutputOrDir,
-
- OutputFile, /* These types require the */
- OutputFileOrDir, /* 'NoMore' case below. */
- DirOnly;
- switch {
- case OptionalFile:
- /* Using this case makes a popup with two or three items.
- This first item is used to select a default file or to
- select no file. The second (and third) item(s) are used
- to select input or output files. */
- key int = 0;
- rect; /* bounds of title */
- rect; /* bounds of display box */
- cstring; /* title */
- cstring; /* default file */
- cstring; /* option to return before file */
- cstring; /* If this item is dependent upon
- another Files item, an extension
- can be specified here to be added
- to the dependents file. */
- cstring; /* help text for popup */
- byte dim, dontDim; /* Normally, dependent items are
- dimmed if the parent is disabled,
- if this field is "dontDim", then
- this item won't be dimmed */
- /* These next three strings are the strings displayed in the popup. Most
- of the file types have only two strings but InputOrOutputFile and
- InputOrOutputOrDir require three strings. If a string is set to "",
- Commando will use a built-in default. */
- cstring; /* popup item #1 */
- cstring; /* popup item #2 */
- cstring; /* popup item #3 */
-
- case RequiredFile:
- /* Using this case makes a button that goes directly to standard
- file. Use this case when a file is required and the user doesn't
- have the choice of a default file or no file. */
- key int = 1;
- rect; /* bounds of button */
- cstring; /* title of button */
- cstring; /* option to return before file */
- cstring; /* help text for button */
- };
-
- /* Some file types take additional information. See the comment next to the
- file types to find out which case to choose here. */
- switch {
- case Additional:
- key byte = 0;
- cstring; /* For InputOrOutputFile, an option
- can be specified when a new
- (or output) file is chosen. */
- cstring FilterTypes = ":"; /* preferred file extension (i.e. ".c")
- If null, no radio buttons will be
- displayed. If FilterTypes is used,
- the radio buttons will toggle
- between showing files only with
- the types below and all files */
- cstring; /* title of only files button */
- cstring; /* title of all files button */
- byte = $$CountOf(TypesArray); /* up to 4 types may be specified */
- align word;
- array TypesArray {
- literal longint text = 'TEXT', /* desired input file type, specify */
- obj = 'OBJ ', /* no type for all types */
- appl = 'APPL',
- da = 'DFIL',
- tool = 'MPST';
- };
-
- case NoMore:
- key byte = 1;
- };
-
- case MultiFiles:
- key byte = MultiFilesID;
- cstring; /* button title */
- cstring; /* help text for button */
- align word;
- rect; /* bounds of button */
- cstring; /* message like " Source files to compile: " */
- cstring; /* option returned before each
- filename. Can be null */
- switch {
- case MultiInputFiles:
- key byte = 0;
- byte = $$CountOf(MultiTypesArray); /* up to 4 types may be specified */
- align word;
- array MultiTypesArray {
- literal longint text = 'TEXT', /* desired input file type, specify no type */
- obj = 'OBJ ', /* for all types */
- appl = 'APPL',
- da = 'DFIL',
- tool = 'MPST';
- };
- cstring FilterTypes = ":"; /* preferred file extension (i.e. ".c")
- If null, no radio buttons will be
- displayed. If FilterTypes is used,
- the radio buttons will toggle
- between showing files only with
- the types below and all files */
- cstring; /* title of only files button */
- cstring; /* title of all files button */
-
- case MultiDirs:
- key byte = 1;
-
- case MultiInputFilesAndDirs:
- key byte = 2;
-
- case MultiOutputFiles:
- key byte = 3;
- };
-
- case CheckOption:
- key byte = CheckOptionID;
- byte NotSet, Set; /* whether button is set or not */
- rect; /* bounds */
- cstring; /* title */
- cstring; /* option returned */
- cstring; /* help text for button */
-
- case RadioButtons:
- key byte = RadioButtonsID;
- byte = $$CountOf(radioArray); /* # of buttons */
- wide array radioArray {
- rect; /* bounds */
- cstring; /* title */
- cstring; /* option returned */
- byte NotSet, Set; /* whether button is set or not */
- cstring; /* help text for button */
- align word;
- };
-
- case RegularEntry:
- key byte = RegularEntryID;
- cstring; /* title */
- align word;
- rect; /* bounds of title */
- rect; /* bounds of input box */
- cstring; /* default value */
- byte ignoreCase, keepCase; /* the default value is never displayed
- in the commando window. If what the
- user types in the textedit window
- matches the default value, then that
- value isn't displayed. This flag
- tells Commando whether to ignore case
- when comparing the contents of the textedit
- window with the default value. */
- cstring; /* option returned */
- cstring; /* help text for entry */
-
- case MultiRegularEntry: /* For scrollable, lists of an option */
- key byte = MultiRegularEntryID;
- cstring; /* title */
- align word;
- rect; /* bounds of title */
- rect; /* bounds of input list */
- byte = $$CountOf(DefEntryList);
- array DefEntryList {
- cstring; /* default values */
- };
- cstring; /* option returned. Each value
- will be preceded with this
- option */
- cstring; /* help text for entry */
-
- case Box: /* Can be used to draw lines too */
- key byte = BoxID;
- byte black, gray; /* color of object */
- rect; /* bounds of box or line */
-
- case TextBox: /* Draws a box with title in upper-left */
- key byte = TextBoxID;
- byte black, gray; /* color of object */
- rect; /* bounds of box or line */
- cstring; /* title */
-
- case TextTitle:
- key byte = TextTitleID;
- byte plain; /* style of text */
- rect; /* bounds of title */
- int systemFont; /* font number to use */
- int systemSize; /* font size to use */
- cstring; /* the text to display */
-
- case PopUp:
- key byte = PopUpID;
- byte Window, Alias, Font, Set; /* popup type */
- rect; /* bounds of title */
- rect; /* bounds of popup line */
- cstring; /* title */
- cstring; /* option returned */
- cstring; /* help text for popup */
- byte noDefault, hasDefault; /* hasDefault if first item is "Default Value" */
-
- case EditPopUp:
- key byte = EditPopUpID;
- /* For MenuItem, this EditPopUp must be dependent upon another EditPopUp
- of the MenuTitle type so that the control knows whose menu items to
- display.
-
- For FontSize, this EditPopUp must be dependent upon a PopUp of the
- Font type so that the control knows what sizes of the font exist. */
-
- byte MenuTitle, MenuItem, /* Type of editable pop-up */
- FontSize, Alias, Set;
- rect; /* bounds of title */
- rect; /* bounds of text edit area */
- cstring; /* title */
- cstring; /* option to return */
- cstring; /* help text for textedit part */
- cstring; /* help text for popup part */
-
- case NestedDialog:
- key byte = NestedDialogID;
- byte; /* the number of the dialog
- to call. It must be greater
- than the current dialog */
- rect; /* bounds of button */
- cstring; /* button's title */
- cstring; /* help text for button */
-
- case Redirection:
- key byte = RedirectionID;
- byte StandardOutput, DiagnosticOutput, /* the type of redirection */
- StandardInput;
- point; /* upper-left point of the whole contraption */
-
- case TriStateButtons:
- key byte = TriStateButtonsID;
- byte = $$CountOf(threeStateArray); /* # of buttons */
- cstring; /* option returned */
- wide array threeStateArray {
- align word;
- rect; /* bounds */
- cstring; /* title */
- cstring; /* string for Clear state */
- cstring; /* string for DontTouch state */
- cstring; /* string for Set state */
- cstring; /* help text for button */
- };
-
- case List: /* Puts up a list of "things" and allows multiple selections */
- key byte = ListID;
- byte Volumes, ShellVars,
- Windows, Aliases; /* what to display in the list */
- cstring; /* option to return before each "thing" */
- cstring; /* title */
- align word;
- rect; /* bounds of title */
- rect; /* bounds of list selection box */
- cstring; /* help text for selection box */
-
- case PictOrIcon:
- key byte = PictOrIconID;
- byte Icon, Picture; /* display a picture or icon */
- int; /* resource id of icon/picture */
- rect; /* display bounds */
-
- case Dummy:
- key byte = DummyID;
-
- case DoItButton: /* Allows the 'do it' button to be dependent */
- key byte = DoItButtonID;
-
- case VersionDialog: /* Display a dialog when the version # is clicked */
- key byte = VersionDialogID;
- switch {
- case VersionString: /* Version string embedded right here */
- key byte = 0;
- cstring; /* Version string of tool (e.g. V2.0) */
-
- case VersionResource: /* Versions string comes from another resource */
- key byte = 1;
- literal longint; /* resource type of pascal string containing version string */
- integer; /* resource id of version string */
- };
- cstring; /* Version text for help window */
- align word;
- integer noDialog; /* Rsrc id of 'DLOG' */
- /* NOTE •1: if there is no modal dialog to display when the version
- string is clicked, set the rsrc id to zero (noDialog).
-
- NOTE •2: if the version string comes from another resource (VersionResource),
- the string must be the first thing in the resource and the string must be
- a pascal-style string. A 'STR ' resource is an example of a resource that
- fits the bill.
-
- NOTE •3: if the modal dialog is to have a filter proc, the proc
- must be linked as a 'fltr' resource with the same resource id
- as the dialog. */
- };
- align word;
- };
- align word;
- };
- };
-
- æKY mxwt
- æC /*
- 'mxwt' is a new resource type for templates. The only difference is a word count for the
- number of fields in a type. 'mxbt' used a byte count. 'mxbt' is still supported.
- However, you need the word count if you want to use ResEdit to create templates.
- */
-
- type 'mxwt'{
- integer = $$CountOf(templates); /* Number of templates */
- array templates { pString; /* Type name */
- integer = $$CountOf(fields); /* Number of fields in this template */
- array fields { pString; /* Field name */
- pString; /* Field type */
- integer; /* Number of fields of this type */
- };
- };
- };
-
- resource 'mxwt' (100) {
- {
-
- /* Sample shows all possible types:
- "Sample", {
- "Byte", "Byte", 1,
- "Signed Byte", "SignedByte", 1,
- "Unsigned Byte", "UnsignedByte", 1,
- "Align to word", "Align", 1,
- "Word", "Word", 1,
- "Signed Word", "SignedWord", 1,
- "Unsigned Word", "UnsignedWord", 1,
- "Long", "Long", 1,
- "Signed Long", "SignedLong", 1,
- "Unsigned Long", "UnsignedLong", 1,
- "Boolean", "Boolean", 1,
- "Padding", "Skip", 1,
- "Pascal string", "pString", 10,
- "C string", "cString", 1,
- "Align to word", "Align", 1,
- "Text", "Text", 4,
- "Handle", "Handle", 1,
- "Next", "^Sample", 1
- },
- */
-
- "BitMap", {
- "baseAddr", "Long", 1,
- "rowBytes", "Word", 1,
- "bounds", "Word", 4
- },
-
- "GrafPort", {
- "device", "word", 1,
- "portBits", "BitMap", 1,
- "portRect", "Word", 4,
- "visRgn", "Handle", 1,
- "clipRgn", "Handle", 1,
- "bkPat", "Byte", 8,
- "fillPat", "Byte", 8,
- "pnLoc", "Word", 2,
- "pnSize", "Word", 2,
- "pnMode", "Word", 1,
- "pnPat", "Byte", 8,
- "pnVis", "Word", 1,
- "txFont", "Word", 1,
- "txFace", "Word", 1,
- "txMode", "Word", 1,
- "txSize", "Word", 1,
- "", "Skip", 4,
- "fgColor", "Long", 1,
- "bkColor", "Long", 1,
- "colrBit", "Word", 1,
- "patStretch", "Word", 1,
- "picSave", "Handle", 1,
- "rgnSave", "Handle", 1,
- "polySave", "Handle", 1,
- "grafProcs", "Long", 1
- },
-
- "WindowRecord", {
- "", "Skip", 16,
- "portRect", "Word", 4,
- "visRgn", "Handle", 1,
- "clipRgn", "Handle", 1,
- "", "Skip", 76,
- "windowKind", "Word", 1,
- "visible", "Boolean", 1,
- "hilited", "Boolean", 1,
- "goAwayFlag", "Boolean", 1,
- "spareFlag", "Boolean", 1,
- "strucRgn", "Handle", 1,
- "contRgn", "Handle", 1,
- "updateRgn", "Handle", 1,
- "windowDefProc", "Handle", 1,
- "dataHandle", "Handle", 1,
- "titleHandle", "^^PString", 1,
- "titleWidth", "Word", 1,
- "controlList", "Handle", 1,
- "nextWindow", "^WindowRecord", 1,
- "windowPic", "Handle", 1,
- "refCon", "Long", 1
- },
-
- "TERec", {
- "destRect", "Word", 4,
- "viewRect", "Word", 4,
- "selRect", "Word", 4,
- "lineHeight", "Word", 1,
- "fontAscent", "Word", 1,
- "selPoint", "Word", 2,
- "selStart", "Word", 1,
- "selEnd", "Word", 1,
- "active", "Word", 1,
- "wordBreak", "Long", 1,
- "clikLoop", "Long", 1,
- "clickTime", "Long", 1,
- "clickLoc", "Word", 1,
- "caretTime", "Long", 1,
- "caretState", "Word", 1,
- "just", "Word", 1,
- "teLength", "Word", 1,
- "hText", "Handle", 1,
- "recalBack", "Word", 1,
- "recalLines", "Word", 1,
- "clikStuff", "Word", 1,
- "crOnly", "Word", 1,
- "txFont", "Word", 1,
- "txFace", "Byte", 1,
- "", "Align", 1;
- "txMode", "Word", 1,
- "txSize", "Word", 1,
- "inPort", "^GrafPort", 1,
- "highHook", "Long", 1,
- "caretHook", "Long", 1,
- "nLines", "Word", 1,
- "lineStarts", "Word", 20 /* Actually, there can be 16001 of these */
- },
-
- "IOPB", {
- "qLink", "Long", 1,
- "qType", "Word", 1,
- "ioTrap", "Word", 1,
- "ioCmdAddr", "Long", 1,
- "ioCompletion", "Long", 1,
- "ioResult", "Word", 1,
- "ioNamePtr", "^PString", 1,
- "ioVRefNum", "Word", 1,
- "ioRefNum", "Word", 1,
- "ioVersNum", "SignedByte", 1,
- "ioPermssn", "SignedByte", 1,
- "ioMisc", "Long", 1,
- "ioBuffer", "Long", 1,
- "ioReqCount", "Long", 1,
- "ioActCount", "Long", 1,
- "ioPosMode", "Word", 1,
- "ioPosOffset", "Long", 1
- },
-
- "Zone", {
- "bkLim", "Long", 1,
- "purgePtr", "Long", 1,
- "hFstFree", "Long", 1,
- "zcbFree", "Long", 1,
- "gzProc", "Long", 1,
- "moreMast", "Word", 1,
- "flags", "Word", 1,
- "", "Skip", 16, /* Unused count fields */
- "purgeProc", "Long", 1,
- "sparePtr", "Long", 1,
- "allocPtr", "Long", 1
- },
-
- "VCB", {
- "qLink", "Long", 1,
- "qType", "Word", 1,
- "vcbFlags", "Word", 1,
- "vcbSigWord", "Word", 1,
- "vcbCrDate", "Long", 1,
- "vcbLsBkUp", "Long", 1,
- "vcbAtrb", "Word", 1,
- "vcbNmFls", "Word", 1,
- "vcbDirSt", "Word", 1,
- "vcbBlLn", "Word", 1,
- "vcbNmBlks", "Word", 1,
- "vcbAlBlkSiz", "Long", 1,
- "vcbClpSiz", "Long", 1,
- "vcbAlBlSt", "Word", 1,
- "vcbNxtFNum", "Long", 1,
- "vcbFreeBks", "Word", 1,
- "vcbVN", "PString", 27,
- "", "Align", 1,
- "vcbDrvNum", "Word", 1,
- "vcbDRefNum", "Word", 1,
- "vcbFSID", "Word", 1,
- "vcbVRefNum", "Word", 1,
- "vcbMAdr", "Long", 1,
- "vcbBufAdr", "Long", 1,
- "vcbMLen", "Word", 1,
- "vcbDirIndex", "Word", 1,
- "vcbDirBlk", "Word", 1
- },
-
- "ControlRecord", {
- "nextControl", "^^ControlRecord", 1,
- "contrlOwner", "Long", 1,
- "contrlRect", "Word", 4,
- "contrlVis", "Byte", 1,
- "contrlHilite", "Byte", 1,
- "contrlValue", "Word", 1,
- "contrlMin", "Word", 1,
- "contrlMax", "Word", 1,
- "contrlDefProc", "Handle", 1,
- "contrlData", "Handle", 1,
- "contrlAction", "Long", 1,
- "contrlRfCon", "Long", 1,
- "contrlTitle", "PString", 0
- },
-
- "DialogRecord", {
- "window", "WindowRecord", 1,
- "items", "Handle", 1,
- "textH", "^^TERec", 1,
- "editField", "Word", 1,
- "editOpen", "Word", 1,
- "aDefItem", "Word", 1
- },
-
- "EventRecord", {
- "what", "Word", 1,
- "message", "Long", 1,
- "when", "Long", 1,
- "where", "Word", 2,
- "modifiers", "Word", 1
- },
-
- "SFReply", {
- "good", "Boolean", 1,
- "copy", "Boolean", 1,
- "fType", "Text", 4,
- "vRefNum", "Word", 1,
- "version", "Word", 1,
- "fName", "PString", 0
- },
-
- "MenuInfo", {
- "menuID", "Word", 1,
- "menuWidth", "Word", 1,
- "menuHeight", "Word", 1,
- "menuProc", "Long", 1,
- "enableFlags", "Long", 1,
- "menuData", "PString", 0
- },
-
- "FontRec", {
- "fontType", "Word", 1,
- "firstChar", "Word", 1,
- "lastChar", "Word", 1,
- "widMax", "Word", 1,
- "kernMax", "SignedWord", 1,
- "nDescent", "SignedWord", 1,
- "fRectWidth", "Word", 1,
- "fRectHeight", "Word", 1,
- "owTLoc", "Word", 1,
- "ascent", "Word", 1,
- "descent", "Word", 1,
- "leading", "Word", 1,
- "rowWords", "Word", 1,
- "bitImage", "Byte", 16,
- "bitImage", "Byte", 16,
- "bitImage", "Byte", 16,
- "bitImage", "Byte", 16
- },
-
- "ListRec", {
- "rview", "Word", 4,
- "portPtr", "Long", 1,
- "indent", "Word", 2,
- "cellSize", "Word", 2,
- "visible", "Word", 4,
- "vScroll", "Handle", 1,
- "hScroll", "Handle", 1,
- "selFlags", "Byte", 1,
- "lActive", "Boolean", 1,
- "lReserved", "Byte", 1,
- "listFlags", "Byte", 1,
- "clikTime", "Long", 1,
- "clikLoc", "Word", 2,
- "mouseLoc", "Word", 2,
- "lClikLoop", "Long", 1,
- "lastClick", "Word", 2,
- "refCon", "Long", 1,
- "listDefProc", "Handle", 1,
- "userHandle", "Handle", 1,
- "dataBounds", "Word", 4,
- "cells", "Handle", 1,
- "maxIndex", "Word", 1,
- "cellArray", "Word", 16
- },
-
- /* "DM A6+14 Stack" will display the parameters and locals on the stack */
- "Stack", {
- "Param 1", "Long", 1,
- "Param 2", "Long", 1,
- "Param 3", "Long", 1,
- "Param 4", "Long", 1,
- "", "Skip", 8, /* Skip return address and A6 */
- "Local 1", "Long", 1,
- "Local 2", "Long", 1,
- "Local 3", "Long", 1,
- "Local 4", "Long", 1
- },
- },
- };
-
- æKY mxbm
- æC type 'mxbm'{
- integer = $$CountOf(symbols); /* Number of entries */
- array symbols { pString; pString; }; /* Macro name; expansion */
- };
-
- resource 'mxbm' (100) {
- { /* Useful command lines */
-
- /* Clear breakpoints, A-Trap breaks and then go */
- "GG", "BRC;ATC;G",
-
- /* Break at the first instruction of a segment after loading it */
- "GS", "SB 12D 1;G;T 2;SB 12D 0",
-
- /* Pop the return address of the stack and go to it */
- "RTS", "PC = SP^;SP = SP + 4",
-
- /* Enter "GTO n" to go till offset n in the current procedure is reached */
- "GTO", "GT :+",
-
- /* Enter "BRO n" to set a breakpoint at offset n in the current procedure */
- "BRO", "BR :+",
-
- /* Displays the port assuming the A5 world is set up */
- "thePort", "DM A5^^ WindowRecord",
-
- /* IJ disassembles starting from the destination of a JMP instruction */
- "IJ", "IL (.+2)^",
-
-
- "ABusVars", "02D8",
- "ACount", "0A9A",
- "ADBBase", "0CF8",
- "AGBHandle", "0D1C",
- "AlarmState", "021F",
- "ANumber", "0A98",
- "ApFontID", "0984",
- "App2Packs", "0BC8",
- "ApplLimit", "0130",
- "ApplScratch", "0A78",
- "ApplZone", "02AA",
- "AppPacks", "0AB8",
- "AppParmHandle", "0AEC",
- "ASCBase", "0CC0",
- "AtalkHk1", "0B14",
- "AtalkHk2", "0B18",
- "AtMenuBottom", "0A0C",
- "AuxCtlHead", "0CD4",
- "AuxWinHead", "0CD0",
-
- "BNMQHd", "0B60",
- "BootDrive", "0210",
- "BootMask", "0B0E",
- "BootTmp8", "0B36",
- "BtDskRfn", "0B34",
- "BufPtr", "010C",
- "BufTgDate", "0304",
- "BufTgFBkNum", "0302",
- "BufTgFFlg", "0300",
- "BufTgFNum", "02FC",
-
- "CaretTime", "02F4",
- "ChooserBits", "0946",
- "ChunkyDepth", "0D60",
- "CkdDB", "0340",
- "CloseOrnHook", "0A88",
- "ColLines", "0C22",
- "CoreEditVars", "0954",
- "CPUFlag", "012F",
- "CQDGlobals", "0CCC",
- "CrsrAddr", "0888",
- "CrsrBase", "0898",
- "CrsrBusy", "08CD",
- "CrsrCouple", "08CF",
- "CrsrDevice", "089C",
- "CrsrNew", "08CE",
- "CrsrObscure", "08D2",
- "CrsrPin", "0834",
- "CrsrPtr", "0D62",
- "CrsrRect", "083C",
- "CrsrRow", "08AC",
- "CrsrSave", "088C",
- "CrsrScale", "08D3",
- "CrsrState", "08D0",
- "CrsrThresh", "08EC",
- "CrsrVis", "08CC",
- "CurActivate", "0A64",
- "CurApName", "0910",
- "CurApRefNum", "0900",
- "CurDeactive", "0A68",
- "CurDeKind", "0A22",
- "CurDirStore", "0398",
- "CurDragAction", "0A46",
- "CurFMDenom", "0994",
- "CurFMDevice", "098E",
- "CurFMFace", "098C",
- "CurFMFamily", "0988",
- "CurFMInput", "0988",
- "CurFMNeedBits", "098D",
- "CurFMNumer", "0990",
- "CurFMSize", "098A",
- "CurJTOffset", "0934",
- "CurMap", "0A5A",
- "CurPageOption", "0936",
- "CurPitch", "0280",
- "CurrentA5", "0904",
- "CurStackBase", "0908",
-
- "DABeeper", "0A9C",
- "DAStrings", "0AA0",
- "DefltStack", "0322",
- "DefVCBPtr", "0352",
- "DeskCPat", "0CD8",
- "DeskHook", "0A6C",
- "SetOSDefKey", "0CDC",
- "DeskPattern", "0A3C",
- "DeskPort", "09E2",
- "DeviceList", "08A8",
- "DiskVars", "0222",
- "DlgFont", "0AFA",
- "DoubleTime", "02F0",
- "DragFlag", "0A44",
- "DragHook", "09F6",
- "DragPattern", "0A34",
- "DrMstrBlk", "034C",
- "DrvQHdr", "0308",
- "DSAlertRect", "03F8",
- "DSAlertTab", "02BA",
- "DSCtrAdj", "0DA8",
- "DSDrawProc", "0334",
- "DSErrCode", "0AF0",
- "DskErr", "0142",
- "DskRtnAdr", "0124",
- "DskSwtchHook", "03EA",
- "DskVerify", "012C",
- "DskWr11", "012F",
- "DSWndUpdate", "015D",
- "DTQFlags", "0D92",
- "DTQueue", "0D92",
- "DTskQHdr", "0D94",
- "DTskQTail", "0D98",
-
- "EjectNotify", "0338",
- "EndSRTPtr", "0DB4",
- "ErCode", "03A2",
- "EventQueue", "014A",
- "EvtBufCnt", "0154",
- "ExpandMem", "02B6",
- "ExtFSHook", "03E6",
- "ExtStsDT", "02BE",
-
- "FCBSPtr", "034E",
- "FDevDisable", "0BB3",
- "FileVars", "0340",
- "Filler3A", "0214",
- "Finder", "0261",
- "FinderName", "02E0",
- "FLckUnlck", "0348",
- "FlEvtMask", "025E",
- "FlushOnly", "0346",
- "FMDefaultSize", "0987",
- "FMDotsPerInch", "09B2",
- "FMExist", "0D42",
- "FMgrOutRec", "0998",
- "FMStyleTab", "09B6",
- "FondID", "0BC6",
- "FondState", "0903",
- "FontFlag", "015E",
- "FOutAscent", "09A5",
- "FOutBold", "099E",
- "FOutDenom", "09AE",
- "FOutDescent", "09A6",
- "FOutError", "0998",
- "FOutExtra", "09A4",
- "FOutFontHandle", "099A",
- "FOutItalic", "099F",
- "FOutLeading", "09A8",
- "FOutNumer", "09AA",
- "FOutRec", "0998",
- "FOutShadow", "09A3",
- "FOutULOffset", "09A0",
- "FOutULShadow", "09A1",
- "FOutULThick", "09A2",
- "FOutUnused", "09A9",
- "FOutWidMax", "09A7",
- "FPState", "0A4A",
- "FractEnable", "0BF4",
- "FrcSync", "0349",
- "FSBusy", "0360",
- "FScaleDisable", "0A63",
- "FScaleHFact", "0BF6",
- "FScaleVFact", "0BFA",
- "FSFCBLen", "03F6",
- "FSQHdr", "0360",
- "FSQHead", "0362",
- "FSQTail", "0366",
- "FSQueueHook", "03E2",
- "FSTemp4", "03DE",
- "FSTemp8", "03D6",
- "FSVarEnd", "03F6",
-
- "GetParam", "01E4",
- "GhostWindow", "0A84",
- "GotStrike", "0986",
- "GrafBegin", "0800",
- "GrafVar", "0824",
- "GrayRgn", "09EE",
- "GZMoveHnd", "0330",
- "GZRootHnd", "0328",
- "GZRootPtr", "032C",
-
- "HeapEnd", "0114",
- "HFSFlags", "0376",
- "HiHeapMark", "0BAE",
- "HiKeyLast", "0216",
- "HiliteMode", "0938",
- "HiliteRGB", "0DA0",
- "HpChk", "0316",
- "HWCfgFlags", "0B22",
-
- "IAZNotify", "033C",
- "IconBitmap", "0A0E",
- "IconTLAddr", "0DAC",
- "IntFlag", "015F",
- "IntlSpec", "0BA0",
- "IWM", "01E0",
-
- "JAdrDisk", "0252",
- "JAllocCrsr", "088C",
- "JControl", "0242",
- "JCrsrObscure", "081C",
- "JCrsrTask", "08EE",
- "JDCDReset", "0B48",
- "JDiskPrime", "0226",
- "JDiskSel", "0B40",
- "jDTInstall", "0D9C",
- "JFetch", "08F4",
- "JFigTrkSpd", "0222",
- "JFontInfo", "08E4",
- "JGNEFilter", "029A",
- "JHideCursor", "0800",
- "JInitCrsr", "0814",
- "JIODone", "08FC",
- "JKybdTask", "021A",
- "JMakeSpdTbl", "024E",
- "JOpcodeProc", "0894",
- "JournalFlag", "08DE",
- "JournalRef", "08E8",
- "JRdAddr", "022A",
- "JRdData", "022E",
- "JRecal", "023E",
- "JReSeek", "024A",
- "JScrnAddr", "080C",
- "JScrnSize", "0810",
- "JSeek", "0236",
- "JSendCmd", "0B44",
- "JSetCCrsr", "0890",
- "JSetCrsr", "0818",
- "JSetSpeed", "0256",
- "JSetUpPoll", "023A",
- "JShell", "0212",
- "JShieldCursor", "0808",
- "JShowCursor", "0804",
- "JStash", "08F8",
- "JSwapFont", "08E0",
- "jSwapMMU", "0DBC",
- "JUpdateProc", "0820",
- "JVBLTask", "0D28",
- "JWakeUp", "0246",
- "JWrData", "0232",
-
- "KbdLast", "0218",
- "KbdType", "021E",
- "KbdVars", "0216",
- "Key1Trans", "029E",
- "Key2Trans", "02A2",
- "KeyLast", "0184",
- "KeyMap", "0174",
- "KeyMVars", "0B04",
- "KeypadMap", "017C",
- "KeyRepThresh", "0190",
- "KeyRepTime", "018A",
- "KeyThresh", "018E",
- "KeyTime", "0186",
-
- "LastDepth", "0D40",
- "LastFond", "0BC2",
- "LastFore", "0D36",
- "LastLGlobal", "0944",
- "LastMode", "0D3E",
- "LastPGlobal", "0954",
- "LastSPExtra", "0B4C",
- "LastTGLobal", "0AFC",
- "LastTxGDevice", "0DC4",
- "LaunchFlag", "0902",
- "LGrafJump", "0824",
- "LoaderPBlock", "093A",
- "LoadFiller", "090C",
- "LoadTrap", "012D",
- "LoadVars", "0900",
- "Lvl1DT", "0192",
- "Lvl2DT", "01B2",
-
- "MacJmp", "0120",
- "MacPgm", "0316",
- "MAErrProc", "0BE8",
- "MainDevice", "08A4",
- "MaskBC", "031A",
- "MaskHandle", "031A",
- "MaskPtr", "031A",
- "MASuperTab", "0BEC",
- "MaxDB", "0344",
- "MBarEnable", "0A20",
- "MBarHeight", "0BAA",
- "MBarHook", "0A2C",
- "MBDFHndl", "0B58",
- "MBSaveLoc", "0B5C",
- "MBState", "0172",
- "MBTicks", "016E",
- "MemErr", "0220",
- "MemTop", "0108",
- "MenuCInfo", "0D50",
- "MenuDisable", "0B54",
- "MenuFlash", "0A24",
- "MenuHook", "0A30",
- "MenuList", "0A1C",
- "MickeyBytes", "0D6A",
- "MinStack", "031E",
- "MMDefFlags", "0326",
- "MmInOK", "012E",
- "MMU32bit", "0CB2",
- "MMUFlags", "0CB0",
- "MMUFluff", "0CB3",
- "MMUTbl", "0CB4",
- "MMUTblSize", "0CB8",
- "MMUType", "0CB1",
- "MonkeyLives", "0100",
- "Mouse", "0830",
- "MouseMask", "08D6",
- "MouseOffset", "08DA",
- "MrMacHook", "0A2C",
- "MTemp", "0828",
-
- };
- };
-
-
- resource 'mxbm' (101) {
- {"NewCrsrJTbl", "088C",
- "NewMount", "034A",
- "NewUnused", "0BC0",
- "NiblTbl", "025A",
- "NMIFlag", "0C2C",
- "NxtDB", "0342",
-
- "OldContent", "09EA",
- "OldStructure", "09E6",
-
- "PaintWhite", "09DC",
- "Params", "03A4",
- "pCDeskPat", "020B",
- "PmgrHandle", "0DC8",
- "PollProc", "013E",
- "PollRtnAddr", "0128",
- "PollStack", "013A",
- "PortAUse", "0290",
- "PortBUse", "0291",
- "PortList", "0D66",
- "PrintErr", "0944",
- "PrintVars", "0944",
- "PWMBuf1", "0B0A",
- "PWMBuf2", "0312",
- "PWMValue", "0138",
-
- "QDColors", "08B0",
- "QDErr", "0D6E",
- "QDExist", "08F3",
-
- "RAMBase", "02B2",
- "RawMouse", "082C",
- "RegRsrc", "0347",
- "ReqstVol", "03EE",
- "ResErr", "0A60",
- "ResErrProc", "0AF2",
- "ResLoad", "0A5E",
- "ResReadOnly", "0A5C",
- "RestProc", "0A8C",
- "ResumeProc", "0A8C",
- "RGBBlack", "0C10",
- "RGBWhite", "0C16",
- "RgSvArea", "036A",
- "RMgrHiVars", "0B80",
- "RMgrPerm", "0BA4",
- "RndSeed", "0156",
- "ROM85", "028E",
- "ROMBase", "02AE",
- "RomFont0", "0980",
- "ROMMapHndl", "0B06",
- "RomMapInsert", "0B9E",
- "RowBits", "0C20",
- "RSDHndl", "028A",
-
- "SavedHandle", "0A28",
- "SavedHilite", "0D43",
- "SaveFondFlags", "0986",
- "SaveProc", "0A90",
- "SaveSegHandle", "0930",
- "SaveSP", "0A94",
- "SaveUpdate", "09DA",
- "SaveVisRgn", "09F2",
- "SCCASts", "02CE",
- "SCCBSts", "02CF",
- "SCCRd", "01D8",
- "SCCWr", "01DC",
- "ScrapCount", "0968",
- "ScrapHandle", "0964",
- "ScrapInfo", "0960",
- "ScrapName", "096C",
- "ScrapSize", "0960",
- "ScrapState", "096A",
- "ScrapTag", "0970",
- "ScrapVars", "0960",
- "Scratch20", "01E4",
- "Scratch8", "09FA",
- "ScrDmpEnb", "02F8",
- "ScrDmpType", "02F9",
- "ScreenBytes", "0C24",
- "ScreenRow", "0106",
- "ScreenVars", "0292",
- "ScrHRes", "0104",
- "ScrnBase", "0824",
- "ScrnVBLPtr", "0D10",
- "ScrVRes", "0102",
- "SCSIBase", "0C00",
- "SCSIDMA", "0C04",
- "SCSIDrvrs", "0B2E",
- "SCSIFlag", "0B22",
- "SCSIGlobals", "0C0C",
- "SCSIHsk", "0C08",
- "SCSIPoll", "0C2F",
- "SdEnable", "0261",
- "SDMBusErr", "0DC0",
- "SDMJmpTblPtr", "0DB8",
- "SdVolume", "0260",
- "SegHiEnable", "0BB2",
- "SerialVars", "02D0",
- "SEVarBase", "0C30",
- "SEvtEnb", "015C",
- "SFSaveDisk", "0214",
- "SInfoPtr", "0CBC",
- "SInitFlags", "0D90",
- "SlotPrTbl", "0D08",
- "SlotQDT", "0D04",
- "SlotTICKS", "0D14",
- "SlotVBLQ", "0D0C",
- "SMGlobals", "0CC4",
- "SmgrCore", "0BA0",
- "SonyVars", "0134",
- "SoundActive", "027E",
- "SoundBase", "0266",
- "SoundDCE", "027A",
- "SoundGlue", "0AE8",
- "SoundLevel", "027F",
- "SoundPtr", "0262",
- "SoundVars", "0262",
- "SoundVBL", "026A",
- "SPAlarm", "0200",
- "SPATalkA", "01F9",
- "SPATalkB", "01FA",
- "SPClikCaret", "0209",
- "SPConfig", "01FB",
- "SPFont", "0204",
- "SPKbd", "0206",
- "SPMisc1", "020A",
- "SPMisc2", "020B",
- "SPPortA", "01FC",
- "SPPortB", "01FE",
- "SPPrint", "0207",
- "SPValid", "01F8",
- "SPVolCtl", "0208",
- "SrcDevice", "08A0",
- "SRsrcTblPtr", "0D24",
- "StkLowPt", "0110",
- "Switcher", "0282",
- "SwitcherTPtr", "0286",
- "SynListHandle", "0D32",
- "SysCom", "0100",
- "SysEvtBuf", "0146",
- "SysEvtMask", "0144",
- "SysFontFam", "0BA6",
- "SysFontSize", "0BA8",
- "SysMap", "0A58",
- "SysMapHndl", "0A54",
- "SysParam", "01F8",
- "SysResName", "0AD8",
- "SysVersion", "015A",
- "SysZone", "02A6",
-
- "T1Arbitrate", "0B3F",
- "TableSeed", "0D20",
- "TagData", "02FA",
- "TaskLock", "0A62",
- "TEDoText", "0A70",
- "TempRect", "09FA",
- "TERecal", "0A74",
- "TEScrpHandle", "0AB4",
- "TEScrpLength", "0AB0",
- "TESysJust", "0BAC",
- "TEWdBreak", "0AF6",
- "TheCrsr", "0844",
- "TheGDevice", "0CC8",
- "TheMenu", "0A26",
- "TheZone", "0118",
- "Ticks", "016A",
- "Time", "020C",
- "TimeDBRA", "0D00",
- "TimeSCCDB", "0D02",
- "TimeSCSIDB", "0DA6",
- "TimeVars", "0B30",
- "TmpResLoad", "0B9F",
- "Tocks", "0173",
- "ToExtFS", "03F2",
- "ToolScratch", "09CE",
- "TopMapHndl", "0A50",
- "TopMenuItem", "0A0A",
- "TrapAgain", "0B00",
- "Twitcher1", "0B50",
- "Twitcher2", "0B7C",
-
- "UnitNtryCnt", "01D2",
- "UsedFWidths", "0BF5",
- "UTableBase", "011C",
-
- "VBLQueue", "0160",
- "VCBQHdr", "0356",
- "VertRRate", "0D30",
- "VIA", "01D4",
- "VIA2DT", "0D70",
- "VideoInfoOK", "0DB0",
- "VidMode", "0C2E",
- "VidType", "0C2D",
-
- "WarmStart", "0CFC",
- "WidthListHand", "08E4",
- "WidthPtr", "0B10",
- "WidthTabHandle", "0B2A",
- "WindowList", "09D6",
- "WMgrCPort", "0D2C",
- "WMgrPort", "09DE",
- "WordRedraw", "0BA5",
- "WWExist", "08F2",
- };
- };
-
- type 'mxbm'{
- integer = $$CountOf(symbols); /* Number of entries */
- array symbols { pString; pString; }; /* Macro name; expansion */
- };
-
-
- /* These macros enable you to type "ATB ListManagerCall" as if ListManagerCall was a trap */
-
- resource 'mxbm' (104) {
- {
- "LActivate", "Pack0 SP^.W=#0",
- "LAddColumn", "Pack0 SP^.W=#4",
- "LAddRow", "Pack0 SP^.W=#8",
- "LAddToCell", "Pack0 SP^.W=#12",
- "LAutoScroll", "Pack0 SP^.W=#16",
- "LCellSize", "Pack0 SP^.W=#20",
- "LClick", "Pack0 SP^.W=#24",
- "LClrCell", "Pack0 SP^.W=#28",
- "LDelColumn", "Pack0 SP^.W=#32",
- "LDelRow", "Pack0 SP^.W=#36",
- "LDispose", "Pack0 SP^.W=#40",
- "LDoDraw", "Pack0 SP^.W=#44",
- "LDraw", "Pack0 SP^.W=#48",
- "LFind", "Pack0 SP^.W=#52",
- "LGetCell", "Pack0 SP^.W=#56",
- "LGetSelect", "Pack0 SP^.W=#60",
- "LLastClick", "Pack0 SP^.W=#64",
- "LNew", "Pack0 SP^.W=#68",
- "LNextCell", "Pack0 SP^.W=#72",
- "LRect", "Pack0 SP^.W=#76",
- "LScroll", "Pack0 SP^.W=#80",
- "LSearch", "Pack0 SP^.W=#84",
- "LSetCell", "Pack0 SP^.W=#88",
- "LSetSelect", "Pack0 SP^.W=#92",
- "LSize", "Pack0 SP^.W=#96",
- "LUpdate", "Pack0 SP^.W=#100",
- };
- };
-
- æKY mxbi
- æC This resource initializes MacsBug options for:
-
- • The number of traps that are recorded using ATR/ATP commands
- • The number of lines in the PC window
- • The number of bytes used to save the command history
-
- If no mxbi resource is found then MacsBug defaults to:
-
- • 16 traps recorded
- • 2 lines in the PC window
- • 2K bytes of command history
-
- */
-
- type 'mxbi' { integer; integer; integer; };
-
- resource 'mxbi' (0) {
- 16, /* Record the last 16 traps */
- 2, /* Display the procedure name and one disassembled lines */
- 2048; /* Save 2K bytes of command output for later review */
- };
-
-
-
- type 'mxbm'{
- integer = $$CountOf(symbols); /* Number of entries */
- array symbols { pString; pString; }; /* Macro name; expansion */
- };
-
-
- /* These macros enable you to type "ATB HFSCall" as if HFSCall was a trap */
-
- resource 'mxbm' (103) {
- {
- "OpenWD", "HFSDispatch D0.W=#1",
- "CloseWD", "HFSDispatch D0.W=#2",
- "CatMove", "HFSDispatch D0.W=#5",
- "DirCreate", "HFSDispatch D0.W=#6",
- "GetWDInfo", "HFSDispatch D0.W=#7",
- "GetFCBInfo", "HFSDispatch D0.W=#8",
- "GetCatInfo", "HFSDispatch D0.W=#9",
- "SetCatInfo", "HFSDispatch D0.W=#10",
- "SetVolInfo", "HFSDispatch D0.W=#11",
- "LockRgn", "HFSDispatch D0.W=#16",
- "UnlockRgn", "HFSDispatch D0.W=#17",
- };
- };
-
-
- type 'mxbm'{
- integer = $$CountOf(symbols); /* Number of entries */
- array symbols { pString; pString; }; /* Macro name; expansion */
- };
-
-
- /* These macros enable you to type "ATB FO<name>" as if FO<name> was a trap */
-
- resource 'mxbm' (102) {
- {
- "FOADD", "FP68K (SP+1)^.B=0",
- "FOSUB", "FP68K (SP+1)^.B=2",
- "FOMUL", "FP68K (SP+1)^.B=4",
- "FODIV", "FP68K (SP+1)^.B=6",
- "FOCMP", "FP68K (SP+1)^.B=9",
- "FOCPX", "FP68K (SP+1)^.B=A",
- "FOREM", "FP68K (SP+1)^.B=C",
- "FOZ2X", "FP68K (SP+1)^.B=E",
- "FOX2Z", "FP68K (SP+1)^.B=10",
- "FOSQRT", "FP68K (SP+1)^.B=12",
- "FORTI", "FP68K (SP+1)^.B=14",
- "FOTTI", "FP68K (SP+1)^.B=16",
- "FOSCALB", "FP68K (SP+1)^.B=18",
- "FOLOGB", "FP68K (SP+1)^.B=1A",
- "FOCLASS", "FP68K (SP+1)^.B=1C",
-
- "FOSETENV", "FP68K (SP+1)^.B=1",
- "FOGETENV", "FP68K (SP+1)^.B=3",
- "FOSETHV", "FP68K (SP+1)^.B=5",
- "FOGETHV", "FP68K (SP+1)^.B=7",
- "FOD2B", "FP68K (SP+1)^.B=9",
- "FOB2D", "FP68K (SP+1)^.B=B",
- "FONEG", "FP68K (SP+1)^.B=D",
- "FOABS", "FP68K (SP+1)^.B=F",
- "FOCPYSGN", "FP68K (SP+1)^.B=11",
- "FONEXT", "FP68K (SP+1)^.B=13",
- "FOSETXCP", "FP68K (SP+1)^.B=15",
- "FOPROCENTRY", "FP68K (SP+1)^.B=17",
- "FOPROCEXIT", "FP68K (SP+1)^.B=19",
- "FOTESTXCP", "FP68K (SP+1)^.B=1B",
-
- "FOLNX", "ELEMS68K (SP+1)^.B=0",
- "FOLOG2X", "ELEMS68K (SP+1)^.B=2",
- "FOLN1X", "ELEMS68K (SP+1)^.B=4",
- "FOLOG21X", "ELEMS68K (SP+1)^.B=6",
- "FOEXPX", "ELEMS68K (SP+1)^.B=8",
- "FOEXP2X", "ELEMS68K (SP+1)^.B=A",
- "FOEXP1X", "ELEMS68K (SP+1)^.B=C",
- "FOEXP21X", "ELEMS68K (SP+1)^.B=C",
- "FOXPWRI", "ELEMS68K (SP+1)^.B=10",
- "FOXPWRY", "ELEMS68K (SP+1)^.B=12",
- "FOCOMPOUND", "ELEMS68K (SP+1)^.B=14",
- "FOANNUITY", "ELEMS68K (SP+1)^.B=16",
- "FOSINX", "ELEMS68K (SP+1)^.B=18",
- "FOCOSX", "ELEMS68K (SP+1)^.B=1A",
- "FOTANX", "ELEMS68K (SP+1)^.B=1C",
- "FOATANX", "ELEMS68K (SP+1)^.B=1E",
- "FORANDX", "ELEMS68K (SP+1)^.B=20",
-
- "FOPSTR2DEC", "DecStr68K (SP+1)^.B=2",
- "FOCSTR2DEC", "DecStr68K (SP+1)^.B=4",
- "FODEC2STRC", "DecStr68K (SP+1)^.B=3",
- };
- };
-
- æKY mxbc
- æC This resource sets the foreground and background colors for the MacsBug display.
- The default is black characters on a white background.
-
- */
-
- type 'mxbc' { integer; integer; integer; integer; integer; integer; };
-
- resource 'mxbc' (0) {
- $FFFF, /* Background Red */
- $FFFF, /* Green */
- $FFFF, /* Blue */
- $0, /* Foreground Red */
- $0, /* Green */
- $0, /* Blue */
- };
-
-
-
-